Re: LookUp Confusion
- From: Brian Bushay TeamB <BBushay@xxxxxxxxx>
- Date: Wed, 30 Aug 2006 20:49:25 -0500
I'm stumped. I've had a look through help, the NGs and the web ... if there is an answer it's buried where I can't find it.
The TCustomADODataSet.Lookup Method is giving me some grief but it may well be that I'm not using it correctly.
My understanding is that Lookup('SSEDC', '0', 'Id'); will look in all existing records and try and find the value '0' in the 'SSEDC' field and if it does, it will return whatever value it finds in the 'Id' field of that record. I know the record exists but LookUp continues to return Null.
Is it possible [providing the theory/usage above is correct] that the problem is due to the fact that I'm adding a bunch of records to a new empty database and referring to one of the recently created ones with LookUp? It is there ... I can see it.
Lookup is going to work only within the scope of the records available in your
dataset. So if you have a filter set or it is a detail table in a master detail
link only the filtered or linked records will be available to the lookup.
--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx
.
- Prev by Date: Re: Outer join in Access
- Next by Date: Batchmove & ADO
- Previous by thread: Outer join in Access
- Next by thread: Batchmove & ADO
- Index(es):