I want to populate a Text box with the results of a query where the parameters are gotten from 2 combo boxes.
The combo box row sources are this:
AND
I have a query that works fine:
This query basically says: Give me what jobs started before the Day And Hour specified AND finished after. Or in other words, the total number of jobs running at that time.
I just don't know enough to get the results to not pop up in a query but to populate a textbox on the form. I understand it is something about putting the query in VB code but I am just a newbie in VB\Access.
I would appreciate any assistance.
Jon
There is much pleasure to be gained from useless knowledge. (Bertrand Russell)
The combo box row sources are this:
Code:
SELECT DISTINCT [200_Server_Jobs].[Day Started] FROM 200_Server_Jobs;
Code:
SELECT DISTINCT [200_Server_Jobs].[Hour Started] FROM 200_Server_Jobs;
I have a query that works fine:
Code:
SELECT Count([200_Server_Jobs].[Client]) AS QActivejobs
FROM 200_Server_Jobs
WHERE ((([200_Server_Jobs].[Day Started])<=([Forms]![jobsrunning]![CmbDay])) AND (([200_Server_Jobs].[Hour Started])<=([Forms]![jobsrunning]![CmbHour])) AND (([200_Server_Jobs].[Day Ended])>=([Forms]![jobsrunning]![CmbDay])) AND (([200_Server_Jobs].[Hour Finished])>=([Forms]![jobsrunning]![CmbHour])));
This query basically says: Give me what jobs started before the Day And Hour specified AND finished after. Or in other words, the total number of jobs running at that time.
I just don't know enough to get the results to not pop up in a query but to populate a textbox on the form. I understand it is something about putting the query in VB code but I am just a newbie in VB\Access.
I would appreciate any assistance.
Jon
There is much pleasure to be gained from useless knowledge. (Bertrand Russell)