old form code

  • Thread starter Thread starter eb1mom
  • Start date Start date
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.
 
Try the following for your SQL string:

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


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

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

Jim
 
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.
.
.
 
Back
Top