Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / October 2007

Tip: Looking for answers? Try searching our database.

Lookup query value from Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wes - 31 Oct 2007 03:25 GMT
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.
tina - 31 Oct 2007 04:00 GMT
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

> Hello.
>
[quoted text clipped - 9 lines]
>
> Thanks for the help.
Marshall Barton - 31 Oct 2007 04:05 GMT
>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
[quoted text clipped - 5 lines]
>
>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.

Signature

Marsh
MVP [MS Access]

Wes - 31 Oct 2007 14:35 GMT
> Hello.
>
[quoted text clipped - 9 lines]
>
> Thanks for the help.

Thank you.  I tried this and get error "#Name?".  Any ideas?
Marshall Barton - 31 Oct 2007 18:41 GMT
>> 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
[quoted text clipped - 5 lines]
>
>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.

Signature

Marsh
MVP [MS Access]

Wes - 31 Oct 2007 19:42 GMT
> >> 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
[quoted text clipped - 17 lines]
> Marsh
> MVP [MS Access]

I had an incorrect quote.  My apologies.  Thanks for the help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.