J
Jonathan Brown
Here's my code. Now, nothing is happening at all. I've checked the table
and there's no new records. Did I use the insert statement correctly?
____________________________________________________________
On Error GoTo Err_cmdAdd_Click
If IsNull(Me.cboBillets) Then
Exit Sub
Else
CurrentProject.Connection.Execute ("INSERT INTO tblBilletsJoin
(ClearanceNum,BilletNum) " & _
"SELECT tblBilletsJoin.ClearanceNum, tblBilletsJoin.BilletNum FROM
tblBilletsJoin " & _
"WHERE tblBilletsJoin.ClearanceNum = " & Me.ClearanceNum & " AND
tblBilletsJoin.BilletNum = " & Me.cboBillets & ";")
Me.lstBillet.Requery
End If
Exit_cmdAdd_Click:
Exit Sub
Err_cmdAdd_Click:
MsgBox Err.Description
Resume Exit_cmdAdd_Click
__________________________________________________________________
Do I need to include the semicolon at the end of my sql statement? I don't
remember if I have to if I'm doing it through code.
and there's no new records. Did I use the insert statement correctly?
____________________________________________________________
On Error GoTo Err_cmdAdd_Click
If IsNull(Me.cboBillets) Then
Exit Sub
Else
CurrentProject.Connection.Execute ("INSERT INTO tblBilletsJoin
(ClearanceNum,BilletNum) " & _
"SELECT tblBilletsJoin.ClearanceNum, tblBilletsJoin.BilletNum FROM
tblBilletsJoin " & _
"WHERE tblBilletsJoin.ClearanceNum = " & Me.ClearanceNum & " AND
tblBilletsJoin.BilletNum = " & Me.cboBillets & ";")
Me.lstBillet.Requery
End If
Exit_cmdAdd_Click:
Exit Sub
Err_cmdAdd_Click:
MsgBox Err.Description
Resume Exit_cmdAdd_Click
__________________________________________________________________
Do I need to include the semicolon at the end of my sql statement? I don't
remember if I have to if I'm doing it through code.