Date B4 16th Each Month After 16th Each Month

S

Songoku

Howdy,

I have a query that reads information from a table which contains 1 month
only of information and this gets overwritten each month. what I have is a
query which pulls of information before and after the 16th. problem is I am
having to manually change the date each time.

i.e in the criteria of the query i am enter < 16/02/05 this gets the job
done but is not very "automatic"

can anyone suggest an easier way of doing this? so I can ammend the query to
pull of the required information but without me having to enter the date in
this way?

Thanks in advance
 
P

PC Datasheet

If you run the query in the same month as the data, you can do this:
<DateSerial(Year(Date()),Month(Date()),16)
 
J

John Vinson

Howdy,

I have a query that reads information from a table which contains 1 month
only of information and this gets overwritten each month. what I have is a
query which pulls of information before and after the 16th. problem is I am
having to manually change the date each time.

i.e in the criteria of the query i am enter < 16/02/05 this gets the job
done but is not very "automatic"

can anyone suggest an easier way of doing this? so I can ammend the query to
pull of the required information but without me having to enter the date in
this way?

Put a calculated field in your table:

DayVal: Day([datefield])

This will be just the day portion of the date; use a criterion of
<= 16 or > 16 as appropriate.

John W. Vinson[MVP]
 
Top