Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unbound text box lookup on Continuous Form

Status
Not open for further replies.

GPM4663

Technical User
Aug 9, 2001
165
GB
Hi Everyone,
I'm convinced I've done this before but just can't get it to work. I have a continuous form with an unbound textbox that I need to populate by looking up a value in a query using criteria based on each record. I was trying to use Dlookup but of course that gave me only the first records value and then all the other text boxes where the same. I am positive I've done this before but i just can't remember how! Please help.

Many thanks,

GPM
 
I think that the only way you can do this is with a query. That is, create a query that references the necessary information and create the form based on that.
 
Unfortunately i can't do that because of how the tables are set up. If I try to add that field to the form-query it becomes non-updateable which is no use to me.

Any other thoughts?

thanks

GPM
 
Sorry, I was not thinking. DlookUp should work, but you will need to reference a key on the continuous form:

[tt]=DlookUp("AField","ATable","AKey=" & [AKey])[/tt]

The above assumes that 'AKey' is numeric, you will need single quotes for a text key.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top