Filtering Expression

C

cvegas

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.
 
A

Allen Browne

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
 

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