Criteria Question

D

DuncanG

I have an append query which runs when the db is opened based on the
following criteria:

<Now()-90

I'm trying to create an options-like form allowing to users to customise the
criteria to suit their needs eg.

<Now()-200

Obviously I can use

<Now()- [reference to control on a form] , but the idea is to allow the user
to open a form change the value to suit their needs and never open the form
again.

So is their a way of allowing users to edit the criteria without opening the
query in design view ?

Duncan
 
T

tina

you might try storing the user-defined value in a table, and then use a
DLookup() function in the criteria, in place of the parameter.

hth
 
F

fredg

I have an append query which runs when the db is opened based on the
following criteria:

<Now()-90

I'm trying to create an options-like form allowing to users to customise the
criteria to suit their needs eg.

<Now()-200

Obviously I can use

<Now()- [reference to control on a form] , but the idea is to allow the user
to open a form change the value to suit their needs and never open the form
again.

So is their a way of allowing users to edit the criteria without opening the
query in design view ?

Duncan

Be aware that using a criteria such as < Now() - 90 will return
different records depending upon the time of day the query is run, as
Now() includes the time of day value as well as the date. Is that what
you want?
I would suggest you probably would want to use < Date() - 90 to
return all records of that 90th day.
 
D

DuncanG

fredg,

thanks for the advise, originally I made the decision to go with now()
because the database stores records of alarm checks which occur throughout
the day and it's usefull to search hours and minutes of records rather than
days however for archiving purposes time of day becomes less relavant . As
this question relates secifically to archive settings I shall opt for Date()
rather than now().

many thanks

regards,
duncan
 
Top