Query referencing dialog box

  • Thread starter Thread starter Jenn
  • Start date Start date
J

Jenn

I am trying to create a report from a query. I first open
a form and enter the dates. I then want my query to run
using the dates I have input in the dialog box. I am
attempting to use the BETWEEN..AND expression in the
query but I keep getting an error message on how I have
entered the expression. I have tried single quotes,
double quotes, brackets and parentheses. I just can't
find the right combination. Here's what I have now:

Between [Forms!'DatesPhysical'!'First'] And
[Forms!'DatesPhysical'!'Last']
 
Between [Forms]![DatesPhysical]![First'] And
[Forms]![DatesPhysical]![Last']

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 
John inadvertently picked up one of your ' characters when he copied your
posted info, I believe -- he meant to post this:

Between [Forms]![DatesPhysical]![First] And [Forms]![DatesPhysical]![Last]


--
Ken Snell
<MS ACCESS MVP>

John Viescas said:
Between [Forms]![DatesPhysical]![First'] And
[Forms]![DatesPhysical]![Last']

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
Jenn said:
I am trying to create a report from a query. I first open
a form and enter the dates. I then want my query to run
using the dates I have input in the dialog box. I am
attempting to use the BETWEEN..AND expression in the
query but I keep getting an error message on how I have
entered the expression. I have tried single quotes,
double quotes, brackets and parentheses. I just can't
find the right combination. Here's what I have now:

Between [Forms!'DatesPhysical'!'First'] And
[Forms!'DatesPhysical'!'Last']
 
Ooops. Thanks for the correction, Ken!

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
Ken Snell said:
John inadvertently picked up one of your ' characters when he copied your
posted info, I believe -- he meant to post this:

Between [Forms]![DatesPhysical]![First] And [Forms]![DatesPhysical]![Last]


--
Ken Snell
<MS ACCESS MVP>

John Viescas said:
Between [Forms]![DatesPhysical]![First'] And
[Forms]![DatesPhysical]![Last']

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
Jenn said:
I am trying to create a report from a query. I first open
a form and enter the dates. I then want my query to run
using the dates I have input in the dialog box. I am
attempting to use the BETWEEN..AND expression in the
query but I keep getting an error message on how I have
entered the expression. I have tried single quotes,
double quotes, brackets and parentheses. I just can't
find the right combination. Here's what I have now:

Between [Forms!'DatesPhysical'!'First'] And
[Forms!'DatesPhysical'!'Last']
 
Back
Top