A
andycambo via AccessMonster.com
Private Sub Command93_Click()
I am currently getting a syntax error with the code below. I can’t figure
out where I am going wrong with the syntax. I haven’t used an INSERT INTO
statement with a WHERE clause before… is it even possible? I’ve tried
debugging it and it seems that the WHERE clause isn’t correct (it’s not
looking up the right value, actually none at all it just selecting ID)
Any help towards a solution will be much appreciated.
Thanks,
Andy.
I am currently getting a syntax error with the code below. I can’t figure
out where I am going wrong with the syntax. I haven’t used an INSERT INTO
statement with a WHERE clause before… is it even possible? I’ve tried
debugging it and it seems that the WHERE clause isn’t correct (it’s not
looking up the right value, actually none at all it just selecting ID)
Code:
Dim strSQL As String
Dim ID As Integer
ID = Me.bMatterID
strSQL = "INSERT INTO tblBilling"
strSQL = strSQL & " (mBillID) "
strSQL = strSQL & " VALUES " & Me.bID & ", WHERE (tblMatters.MatterID = ID)
;"
CurrentDb.Execute strSQL, dbFailOnError
Any help towards a solution will be much appreciated.
Thanks,
Andy.