Querying by start and end time

webmagic

Registered User.
Local time
Today, 02:33
Joined
Jul 18, 2008
Messages
61
Good Morning All,
I am trying to get a query to read from a form a beginning date and an ending date for the query. If I query just by the user id it works great, but once I add the time-I get blank results. I have several fields in my table-user id, start time, end time are the three I am trying to use from the input in the form. Any suggestions?

Thank you in advanced.

SELECT OTM_STATS_20_Short_Time.USER_ID, OTM_STATS_20_Short_Time.MASTER_REX, OTM_STATS_20_Short_Time.Time_Percent_worked, q_abcd_score_per_rex.Grade_Score, OTM_STATS_20_Short_Time.MinOfSTART_TIME, OTM_STATS_20_Short_Time.MaxOfEND_TIME
FROM OTM_STATS_20_Short_Time INNER JOIN q_abcd_score_per_rex ON OTM_STATS_20_Short_Time.MASTER_REX = q_abcd_score_per_rex.MASTER_REX
GROUP BY OTM_STATS_20_Short_Time.USER_ID, OTM_STATS_20_Short_Time.MASTER_REX, OTM_STATS_20_Short_Time.Time_Percent_worked, q_abcd_score_per_rex.Grade_Score, OTM_STATS_20_Short_Time.MinOfSTART_TIME, OTM_STATS_20_Short_Time.MaxOfEND_TIME
HAVING (((OTM_STATS_20_Short_Time.USER_ID)=[Forms]![Form_Date_Input]![User_Id_Input]) AND ((OTM_STATS_20_Short_Time.MinOfSTART_TIME)=[Forms]![Form_Date_Input]![Begin_Date_Input]) AND ((OTM_STATS_20_Short_Time.MaxOfEND_TIME)=[Forms]![Form_Date_Input]![End_Date_Input]));
 
Okay-so I figured this part out and have placed this in the criteria section of the begin_date. Now I get a prompt asking for the begin_date_input and the end_date_input though the form is completed.

Between [Forms]![Form_Date_Input]![Begin_Date_Input] And [Forms]![Form_Date_Input]![End_Date_Input]
 
If you're getting a parameter prompt, most likely either the form is not open or one of the form/control names are misspelled.
 
Thanks Paul. I checked that and started looking even more and actually I had paramters on the form that I didn't clear from when I trying everything to get it to work. It is working great now. Thank you!
 

Users who are viewing this thread

Back
Top Bottom