View Full Version : Searching Between two dates via user inut


DeathByGir
03-25-2008, 04:43 PM
Hey all i need to search for all records found between two dates and all i have been able to find is code that has predefined dates were i need user input.

Here is an example of my code, i got syntax error:

SELECT Applicant_Loan_Info.Submission
FROM Applicant_Loan_Info
WHERE (((Applicant_Loan_Info.Submission) Between #((([Submission]))=[Starting Submission])# And #((([Submission]))=[Ending Submission]#));

And if there is something obviously stupid with it, go easy, new at this.

Thnx in advance

EMP
03-25-2008, 04:52 PM
SELECT Applicant_Loan_Info.Submission
FROM Applicant_Loan_Info
WHERE Applicant_Loan_Info.Submission Between [Starting Submission] And [Ending Submission]

^

Mike375
03-25-2008, 04:56 PM
Perhaps this will help

>=[Forms]![Attempts]![1] And <=[Forms]![Attempts]![2]

I just took those from one of my query criteria.

Attempts is the name of the form and the [1] and [2] are unbound textbox names.

Thus the query uses the entries on the form for its criteria and so there is no need to go to Query/Design view to set the criteria

Mitch_____W
03-25-2008, 04:57 PM
SELECT Applicant_Loan_Info.Submission
FROM Applicant_Loan_Info
WHERE (((Applicant_Loan_Info.Submission) Between [Starting Submission] And [Ending Submission]));

DeathByGir
03-25-2008, 05:02 PM
SELECT Applicant_Loan_Info.Submission
FROM Applicant_Loan_Info
WHERE Applicant_Loan_Info.Submission Between [Starting Submission] And [Ending Submission]

Worked perfectly, thnx alot