Log in

View Full Version : Solved: Between Dates



bopo
01-10-2008, 09:48 AM
Hi

Right, I have a form, a user will enter a date in the following format (dd/mm/) into it. When the text box loses focus, I want and if statement to be executed like the following below

Dim storedatechoice as string

if me.textbox.value > 01/04/(year not applicable) < 31/08/(year not applicable) then storedatechoice = "Yes"
else
if me.textbox.value > 01/10/(year not applicable) < 30/11/(year not applicable)
then storedatechoice = "No"
else
if me.text.value > 01/12/(year not applicable) < 31/01(year not applicable) then
storedatechoice = "N/A"
else
if me.textbox.value > 01/02/(year not applicable) < 31/03/(year not applicable) then
storedatechoice = "No"


Does access have an understanding of dates, for example will it know the different between days & months?

DarkSprout
01-11-2008, 04:33 AM
Is This Solved? Explain...

bopo
01-11-2008, 07:34 AM
Yeah, I ended up using some string manipulation to extract just the month, which was much easier to work with.