Filtering Expression

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

Guest

SELECT Shipment.PUDate, Shipment.SchedDelDate
FROM Shipment
WHERE (((Shipment.PUDate)=Date()) OR ((Shipment.SchedDelDate)=Date()));

I would like to filter my frmDispatchBoard based on the query above.

I am having problem with the syntax.

Me.filter = ?????

Any help would be appreciated.
 
The Filter string is just the WHERE clause form your SQL statement.

Try:
Dim strWhere As String
If Me.Dirty Then Me.Dirty = False 'Save first.
strWhere = "(PUDate = Date()) OR (SchedDelDate = Date())"
Me.Filter = strWhere
Me.FilterOn = True
 
Back
Top