Get record base on a date field

G

Guest

Hi,

I have a querry field which is store some date value like this format
"month&day"
0427
0428
0429
0430
0501
0502

but I have a question, for example if I select the value "0430" in a form
combo box field,
how to show the record value in querry include "0430" & "0501" (one more day
record)

Thank for help!!

Gary
 
G

Guest

Hi Jeremy,

Because the querry field not a date format so I can't use [field]+1,
Also I need the querry can show both combo box value and the next day value.
Any suggestion?

Gary
Jeremy Noland said:
Just do [Date_Field]+1 as an expression in your query.

Jeremy

-----Original Message-----
Hi,

I have a querry field which is store some date value like this format
"month&day"
0427
0428
0429
0430
0501
0502

but I have a question, for example if I select the value "0430" in a form
combo box field,
how to show the record value in querry include "0430" & "0501" (one more day
record)

Thank for help!!

Gary


.
 
J

John Spencer (MVP)

Tricky, but possibly something like the following (assuming a field named "MonthDay")

Where MonthDay = Forms!FormName!ControlName OR
MonthDay = Format(DateSerial(Year(Date()),Left(Forms!FormName!ControlName,2),Right(Forms!FormName!ControlName,2)+1),"MMDD")
 
G

Guest

John,

Thank for help!!


John Spencer (MVP) said:
Tricky, but possibly something like the following (assuming a field named "MonthDay")

Where MonthDay = Forms!FormName!ControlName OR
MonthDay = Format(DateSerial(Year(Date()),Left(Forms!FormName!ControlName,2),Right(Form
s!FormName!ControlName,2)+1),"MMDD")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top