Parameter query syntax error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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