Hi Everyone,
I'm trying to figure out how to use sql in vba. I have form with two fields ConsigneeID (nummeric) and Status (text). On a buttonclick I want the two values on the form being appended to the tblStatus. So I tried this:
But that is not working. How to go about this?
Pampers![[afro] [afro] [afro]](/data/assets/smilies/afro.gif)
There is only one way to change a diaper - fast
I'm trying to figure out how to use sql in vba. I have form with two fields ConsigneeID (nummeric) and Status (text). On a buttonclick I want the two values on the form being appended to the tblStatus. So I tried this:
Code:
Private Sub Command7_Click()
Value1 = Me.ConsigneeID
Value2 = Me.Status
Dim sql As String
sql = "INSERT INTO tblSatus (ConsigneeID, Status) VALUES (Value1, Value2);"
CurrentDb.Execute (sql)
End Sub
But that is not working. How to go about this?
Pampers
![[afro] [afro] [afro]](/data/assets/smilies/afro.gif)
There is only one way to change a diaper - fast