Filter help

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

Guest

In the form properties, I have the control source set to
tblScheduleInformation. I then have the following SQL statement for my filter:

SELECT * FROM tblScheduleInformation WHERE
((([Date(s)])=[forms]![editrecordselection]![ActiveXCtl19]) AND
((ClientID)=[forms]![editrecordselection]![text17]));

When I try to run the form (having run the EditRecordSelection form first, I
get an error:

Syntax error. in query expression '...(list the whole SQL statement here...'

I've run the same SQL statement from a query and it works just fine.

Can anyone help?
 
The Filter property (either Form or Report) are only the "WHERE" portion of
a SQL statement without the actual WHERE (or closing semi-colon).

Try:
MyForm.Filter = "((([Date(s)])=[forms]![editrecordselection]![ActiveXCtl19])
AND ((ClientID)=[forms]![editrecordselection]![text17]))

HTH,
 
Back
Top