Lookup query value from Form

  • Thread starter Thread starter Wes
  • Start date Start date
W

Wes

Hello.

I have a form that I would like to lookup values in several taxt
boxes. The values I want displayed are from several different Sum
Queries.

Example: I want to pull Total Working Blance from a query and monthly
rent revenue from another query. The values all come from different
tables.

Is this possible?

Thanks for the help.
 
you can use a DLookup() function to retrieve the queries' values. read up on
the function in Access Help, so you'll understand how it works. then add an
expression to each textbox control's ControlSource property, as

=DLookup("MyField", "MyQuery", "MyCriteria = 'if the query returns more than
one record')

hth
 
Wes said:
I have a form that I would like to lookup values in several taxt
boxes. The values I want displayed are from several different Sum
Queries.

Example: I want to pull Total Working Blance from a query and monthly
rent revenue from another query. The values all come from different
tables.

Is this possible?

Probably possible.

If the queries only result in one record, then you can use
the DLookup function the get the value of one field:

=DLookup("[some field]", "name of query")

If it's more complicated than that, please explain what you
want from the query and how you identify which record should
be used.
 
Hello.

I have a form that I would like to lookup values in several taxt
boxes. The values I want displayed are from several different Sum
Queries.

Example: I want to pull Total Working Blance from a query and monthly
rent revenue from another query. The values all come from different
tables.

Is this possible?

Thanks for the help.

Thank you. I tried this and get error "#Name?". Any ideas?
 
Wes said:
Thank you. I tried this and get error "#Name?". Any ideas?


Since you did not post your follow up question to a specific
reply, we don't know what "this" you tried. It would be a
big help if you would post a Copy/Paste of the expression
that you used.

As it is, I'll take a guess that you forgot to use an = sign
or have incorrect quotes.
 
Since you did not post your follow up question to a specific
reply, we don't know what "this" you tried. It would be a
big help if you would post a Copy/Paste of the expression
that you used.

As it is, I'll take a guess that you forgot to use an = sign
or have incorrect quotes.

I had an incorrect quote. My apologies. Thanks for the help.
 
Back
Top