K
Kevin
I have the following SQL Statement in a VBA Function.
When I try to run the function it tells me there is a
syntax error.
SELECT DISTINCT Activity.SlsRepID, Activity.Date,
Activity.Time FROM Activity WHERE (((Activity.SlsRepID)="
& [Forms]![Schedule Data Entry]![SalesRep] & ") AND
((Activity.Date)=#[Forms]![Schedule Data Entry]![cboDate]
#) AND ((Activity.Time)='" & [Forms]![Schedule Data
Entry]![Time] & "'));
This query works in the query builder and will accomplish
what I want, but won't run in VBA. The problem is in the
Where clause and is associated with the date.
Any help you can provide will be greatly appreciated!
Kevin
When I try to run the function it tells me there is a
syntax error.
SELECT DISTINCT Activity.SlsRepID, Activity.Date,
Activity.Time FROM Activity WHERE (((Activity.SlsRepID)="
& [Forms]![Schedule Data Entry]![SalesRep] & ") AND
((Activity.Date)=#[Forms]![Schedule Data Entry]![cboDate]
#) AND ((Activity.Time)='" & [Forms]![Schedule Data
Entry]![Time] & "'));
This query works in the query builder and will accomplish
what I want, but won't run in VBA. The problem is in the
Where clause and is associated with the date.
Any help you can provide will be greatly appreciated!
Kevin