Parameter query syntax error

J

johnb

Hi all
In AXP I have a crosstab query which is throwing up a syntax error for the
line below.

PARAMETERS [forms]![frm_WhereSeen_Groupdata]![txtWhereSeen] Text ( 255 ),
Between [forms]![frm_WhereSeen_GroupData]![StartDate] And
[forms]![frm_WhereSeen_GroupData]![EndDate] DateTime;

The code looks ok so I guess that error is elsewhere. But where.

Any sugesstions?
johnb
 
J

John Spencer

No the error is in the lines you posted. Or at least an error is there.

In the parameters section you declare the parameters, but not the operators.
So you need to drop the Between and the And

PARAMETERS [forms]![frm_WhereSeen_Groupdata]![txtWhereSeen] Text ( 255 )
, [forms]![frm_WhereSeen_GroupData]![StartDate] DateTime
, [forms]![frm_WhereSeen_GroupData]![EndDate] DateTime;


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
J

johnb

Cheers John it worked a treat.

johnb

John Spencer said:
No the error is in the lines you posted. Or at least an error is there.

In the parameters section you declare the parameters, but not the operators.
So you need to drop the Between and the And

PARAMETERS [forms]![frm_WhereSeen_Groupdata]![txtWhereSeen] Text ( 255 )
, [forms]![frm_WhereSeen_GroupData]![StartDate] DateTime
, [forms]![frm_WhereSeen_GroupData]![EndDate] DateTime;


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

johnb said:
Hi all
In AXP I have a crosstab query which is throwing up a syntax error for the
line below.

PARAMETERS [forms]![frm_WhereSeen_Groupdata]![txtWhereSeen] Text ( 255 ),
Between [forms]![frm_WhereSeen_GroupData]![StartDate] And
[forms]![frm_WhereSeen_GroupData]![EndDate] DateTime;

The code looks ok so I guess that error is elsewhere. But where.

Any sugesstions?
johnb
 

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