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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DLOOKUP in Form from a Query

Status
Not open for further replies.

Jontmke

MIS
May 25, 2001
1,022
US
Hi:
I have a form with a textbox I am trying to fill with a DLOOKUP to a query.
The form has two combo boxes (which give the query its input), a "run query" button, and the text box.
Here is the Control Source for theText box:
Code:
=DLookUp("[QActivejobs]","Qjobsrun")

Where "QActivejobs" is the result of the "Qjobsrun" query.

It sort of works, if i go into and out of edit mode the box will update. But no other time. How do I get the Textbox to update when I click on the "Run Query" button?

While I am asking how do I not get the query box to pop up? I only want the textbox filled. BTW the query works every time.
Also, just in case you want to see the Query:
Code:
SELECT Count([430_jobs].[Client]) AS QActivejobs
FROM 430_jobs
WHERE ((([430_jobs].[Day Started])<=([Forms]![jobsrunning]![CmbDay])) AND (([430_jobs].[Hour Started])<=([Forms]![jobsrunning]![CmbHour])) AND (([430_jobs].[Day Finished])>=([Forms]![jobsrunning]![CmbDay])) AND (([430_jobs].[Hour Finished])>=([Forms]![jobsrunning]![CmbHour])));
Which asks for all jobs started before yet not finished (still running) for the Day and Hour inputed.

TIA,

Jon

There is much pleasure to be gained from useless knowledge. (Bertrand Russell)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top