Subform year from textbox

steve87bg

Registered User.
Local time
Today, 17:48
Joined
Jan 14, 2013
Messages
19
I wan't to user enter only year in form text box and that my query where statement be

between 1.1.(year from text box) and 31.1.(year from text box)

Is this possible?
 
You could use the DateSerial() function to create your two dates based on the user input, the criteria might look something like;
Code:
Between DateSerial(Forms!YourFormName!YourTextBox , 1, 1) And DateSerial(Forms!YourFormName!YourTextBox, 1, 31)
 
It wont work. Its said that expression is typed incorrectly or that is too complex
 
I've just tested it, again, and yes it does work. However you will need to change YourFormName and YourTextBox to reflect the reality of your DB.
 

Users who are viewing this thread

Back
Top Bottom