Hi All,
- I'm trying to write an append query in VBA.
- I keep getting the message: you are about to append 0 rows
I've been through the help file to run it as a query and still get the same message. can anyone see why its not adding anything??
here's what i've got...
Thanks,
Spinkung.
- I'm trying to write an append query in VBA.
- I keep getting the message: you are about to append 0 rows
I've been through the help file to run it as a query and still get the same message. can anyone see why its not adding anything??
here's what i've got...
Code:
sql = "INSERT INTO TRANSACTIONS (jobNo, charge, quantity, logBy, reqDt) " & _
"SELECT TRANSACTIONS.jobNo, TRANSACTIONS.charge, " & _
"TRANSACTIONS.quantity, TRANSACTIONS.logBy, TRANSACTIONS.reqDt " & _
"FROM TRANSACTIONS " & _
"WHERE TRANSACTIONS.jobNo = '" & Me.txtJobNo.Value & "' " & _
"AND TRANSACTIONS.charge = '" & Me.comboCharge.Column(1) & "' " & _
"AND TRANSACTIONS.quantity = '" & Me.comboQty.Column(0) & "' " & _
"AND TRANSACTIONS.logBy = '" & str & "' " & _
"AND TRANSACTIONS.reqDt = '" & dt & "'"
Debug.Print sql
DoCmd.RunSQL (sql)
Thanks,
Spinkung.