D
dcrqueens
Hello All,
I created a form based off of Martin Green's creating queries on the fly but
I am having some trouble. Below is the code I am using for the On Click even
for the OK button of the form:
Private Sub CmdOk_Click()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
Set db = CurrentDb
Set qdf = db.QueryDefs("QryCustomerStatusâ€)
strSQL = "SELECT Tbl CustomerDeliveryTracking.* †& _
"FROM Tbl CustomerDeliveryTracking †& _
"WHERE Tbl CustomerDeliveryTracking.Status='" &
Me.CboStatus.Value & "’ †& _
"AND Tbl CustomerDeliveryTracking.Package Received='" &
Me.CboPackageReceived.Value & "’ †& _
"AND Tbl CustomerDeliveryTracking.Products Received='" &
Me.CboProductsReceived.Value & "’ †& _
"ORDER BY Tbl CustomerDeliveryTracking.Status,Tbl
CustmoerDeliveryTracking.Customer Number;â€
When I click the Ok button I get a Compile Syntax error and the following is
highligted
Set qdf = db.QueryDefs("QryCustomerStatusâ€)
I have checked and rechecked my spelling and reviewed how it is set up. I
cannot seem to figure out why it will not work.
Any help would be greatly appreciated.
Thank you,
Dcrqueens
I created a form based off of Martin Green's creating queries on the fly but
I am having some trouble. Below is the code I am using for the On Click even
for the OK button of the form:
Private Sub CmdOk_Click()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim strSQL As String
Set db = CurrentDb
Set qdf = db.QueryDefs("QryCustomerStatusâ€)
strSQL = "SELECT Tbl CustomerDeliveryTracking.* †& _
"FROM Tbl CustomerDeliveryTracking †& _
"WHERE Tbl CustomerDeliveryTracking.Status='" &
Me.CboStatus.Value & "’ †& _
"AND Tbl CustomerDeliveryTracking.Package Received='" &
Me.CboPackageReceived.Value & "’ †& _
"AND Tbl CustomerDeliveryTracking.Products Received='" &
Me.CboProductsReceived.Value & "’ †& _
"ORDER BY Tbl CustomerDeliveryTracking.Status,Tbl
CustmoerDeliveryTracking.Customer Number;â€
When I click the Ok button I get a Compile Syntax error and the following is
highligted
Set qdf = db.QueryDefs("QryCustomerStatusâ€)
I have checked and rechecked my spelling and reviewed how it is set up. I
cannot seem to figure out why it will not work.
Any help would be greatly appreciated.
Thank you,
Dcrqueens