M
MGalyardt
Hi,
I'm trying to use a button to update data from one table to another one in a
different database, but can't seem to get the syntax correct. Where am I
going wrong? Here's what I have:
Private Sub C_Click()
Dim strSQL As String
strSQL = "INSERT INTO [FY05 Permit Sales] ( Prefix, Location, Cashier,
[Purchase Date], Price, Payment) IN 'S:\PARKING\ACCESS\ACCESS\Multi-Year
Permit Sales Analysis.mdb'" & _
"SELECT Commuter.Prefix, Commuter.Location,
Commuter.Cashier, Commuter.[Purchase Date], Commuter.Price, Commuter.Payment"
& _
"FROM Commuter WHERE (((Commuter.[Purchase Date]) Is Not
Null))"
db.Execute strSQL, dbFailOnError
End Sub
I'm trying to use a button to update data from one table to another one in a
different database, but can't seem to get the syntax correct. Where am I
going wrong? Here's what I have:
Private Sub C_Click()
Dim strSQL As String
strSQL = "INSERT INTO [FY05 Permit Sales] ( Prefix, Location, Cashier,
[Purchase Date], Price, Payment) IN 'S:\PARKING\ACCESS\ACCESS\Multi-Year
Permit Sales Analysis.mdb'" & _
"SELECT Commuter.Prefix, Commuter.Location,
Commuter.Cashier, Commuter.[Purchase Date], Commuter.Price, Commuter.Payment"
& _
"FROM Commuter WHERE (((Commuter.[Purchase Date]) Is Not
Null))"
db.Execute strSQL, dbFailOnError
End Sub