Query result to text field

G

Gary McCarthy

I have a query that returns a state value, e.g. TX.

I need for that result to populate a text field on a form for comparison.
The query is not based on the record source for the form.

My attempts gives an error -

Me.SAP-ST = Query!qrySAP00Code!ST

Any help is appreciated.

Thanks.
 
J

Jeff Boyce

Gary

One approach might be to use the DLookup() command, point it at the query &
that specific field in the query.

So your code would look more like (untested, incomplete):

Me!SAP-ST = DLookup(...)

Good luck!

Regards

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top