Get record base on a date field

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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


.
 
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")
 
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")
 
Back
Top