Hi All, I am trying to get code for a button to work. I keep getting errors everytime. I get error 1334 if I do seperate DoCmd lines. If I try both on 1 line I get 2943 errors. Im still pretty wet behind the ears on VB code so any help would be greatly appreciated.
I have tried like this: DoCmd.RunSQL strSQL1, strSQL2 and like
this DoCmd.RunSQL strSQL1
DoCmd.RunSQL strSQL2
Here is my full code so far. I actually need to do 3 of them.
Thank You for any assistance
Don
I have tried like this: DoCmd.RunSQL strSQL1, strSQL2 and like
this DoCmd.RunSQL strSQL1
DoCmd.RunSQL strSQL2
Here is my full code so far. I actually need to do 3 of them.
Private Sub Command24_Click()
Dim strSQL1 As String
Dim strSQL2 As String
strSQL1 = "INSERT INTO MASTER1 (PART_DES, PART_NO, PART_LOC, MINIMUM) VALUES ('" & Me.PART_DES & "', '" & Me.PART_NO & "', '" & Me.PART_LOC & "', '" & Me.MINIMUM & "');"
strSQL2 = "INSERT INTO INVEN ( PART_DES, STOCK, DATE, TOTAL_ON, LAST_PRI, RPDATE) VALUES ('" & Me.PART_DES & "', '" & Me.Text31 & "', '" & Me.DATE & "', '" & Me.Text31 & "', '" & Me.V1LAST_PRI & "', '" & Me.DATE & "');"
DoCmd.RunSQL strSQL1
DoCmd.RunSQL strSQL2
End Sub
Dim strSQL1 As String
Dim strSQL2 As String
strSQL1 = "INSERT INTO MASTER1 (PART_DES, PART_NO, PART_LOC, MINIMUM) VALUES ('" & Me.PART_DES & "', '" & Me.PART_NO & "', '" & Me.PART_LOC & "', '" & Me.MINIMUM & "');"
strSQL2 = "INSERT INTO INVEN ( PART_DES, STOCK, DATE, TOTAL_ON, LAST_PRI, RPDATE) VALUES ('" & Me.PART_DES & "', '" & Me.Text31 & "', '" & Me.DATE & "', '" & Me.Text31 & "', '" & Me.V1LAST_PRI & "', '" & Me.DATE & "');"
DoCmd.RunSQL strSQL1
DoCmd.RunSQL strSQL2
End Sub
Thank You for any assistance
Don