DoCmd.OpenQuery....run, and then display calc in textbox

JCross

Registered User.
Local time
Today, 09:04
Joined
Feb 28, 2002
Messages
116
Hi. I'm sorry I've been posting and deleting but I'm trying to figure out just what my problem is before I ask for help....

I want to run a query on the close of a form, and take a calculated field from that query and display the number in a text box on a linked form.

So, on 'save' I have docmd.openquery "qryNoTax"
which produces a field "notax"
how do I USE this field from the query on my form?

Thank you!

Jennifer
 
Jennifer,

The general form is:
= DLookup("NoTax","qryNoTax")

You can enter that in the "ControlSource" property of a text box on a form(include the equal sign)

See Access Help for more details on DLookup.

RichM
 
Thank you, RIch. I've used DLookup - I just didn't know I could use it for a query. Works perfectly!

Jennifer
 

Users who are viewing this thread

Back
Top Bottom