Date Parameter

G

Guest

In my table, I have a date field called Appointment Date which is used in the underlying parameter query
When the user enter a date it should show all dates between 7 to 15 days of the date the user entered
Ex: If the user entered 4/9/2004 it should show all Appointment dates between 4/16/2004 and 4/24/2004
I have tried this two formulas, but did not work… it gives me an error
[enterdate]+6 And <[enterdate]+1

BETWEEN DateAdd("d", 7, [Enter Date]) AND DateAdd("d", 15, [Enter Date]
Any suggestions..
 
R

Rick B

One answer would be...

In the criteria for the AppointmentDate field, enter:
[enterdate]+6 And <[enterdate]+16

Before this will work, right-click in the area where your tables are shown.
select "parameters" and enter the following:

Parameter Data Type
enterdate Date/Time


Rick B

In my table, I have a date field called Appointment Date which is used in
the underlying parameter query.
When the user enter a date it should show all dates between 7 to 15 days of
the date the user entered.
Ex: If the user entered 4/9/2004 it should show all Appointment dates
between 4/16/2004 and 4/24/2004.
I have tried this two formulas, but did not work. it gives me an error.
[enterdate]+6 And <[enterdate]+16

BETWEEN DateAdd("d", 7, [Enter Date]) AND DateAdd("d", 15, [Enter Date])
Any suggestions...
 
R

Rick B

Or try...

BETWEEN DateAdd("d", 7, format([Enter Date],"short date")) AND DateAdd("d",
15, format([Enter Date],"shortdate"))

Rick B


In my table, I have a date field called Appointment Date which is used in
the underlying parameter query.
When the user enter a date it should show all dates between 7 to 15 days of
the date the user entered.
Ex: If the user entered 4/9/2004 it should show all Appointment dates
between 4/16/2004 and 4/24/2004.
I have tried this two formulas, but did not work. it gives me an error.
[enterdate]+6 And <[enterdate]+16

BETWEEN DateAdd("d", 7, [Enter Date]) AND DateAdd("d", 15, [Enter Date])
Any suggestions...
 
G

Guest

Thanks Rick
I tried this two suggestion, but I still get an ODBC error. Is it because me table is linked to the Oracle data warehouse.
Shaji
 

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