old form code

E

eb1mom

I am attempting to update some old code written by a person
who is no longer here,gone 3+ years. The form lets you
select fields for a report, and a date range and then
displays the report. Users only complaint is date range
must be typed exactly >Between#1/2/2001#and#1/2/2002#<. I
know very little about code so I am trying to find an easy
work around. I put two date fields on form with a calendar
date picker. How can I get the original date range field to
show
Between#[date1]#and#[date2]# ?
I have tried many combinations of quotes, and brackets with
no success. Any help would be appreciated.
 
C

Cheryl Fischer

Try the following for your SQL string:

"Between #" & [date1] & "# AND #" & [date2] & "#"


hth,
 
J

Jim/Chris

Try
code
Between me![date1]and me![date2]

in a query
Between [Forms]![formname]![Date1] And
[Forms]![Forms]![formname]![Date2]

Jim
 
E

eb1mom

Thanks for your help. All solutions work.
-----Original Message-----
Try
code
Between me![date1]and me![date2]

in a query
Between [Forms]![formname]![Date1] And
[Forms]![Forms]![formname]![Date2]

Jim
-----Original Message-----
I am attempting to update some old code written by a person
who is no longer here,gone 3+ years. The form lets you
select fields for a report, and a date range and then
displays the report. Users only complaint is date range
must be typed exactly >Between#1/2/2001#and#1/2/2002#<. I
know very little about code so I am trying to find an easy
work around. I put two date fields on form with a calendar
date picker. How can I get the original date range field to
show
Between#[date1]#and#[date2]# ?
I have tried many combinations of quotes, and brackets with
no success. Any help would be appreciated.
.
.
 

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