I am new to VB and am having some problems. I am trying to save data into a table from a form. I am getting an error message "can't find the field '|' referred to in your expression" and it refers to the line that reads Table1a.AddNew.
Thanks! (This is my first encounter with both Access and VB)
Private Sub checkbox1_Exit(Cancel As Integer)
Dim BBCNum As Long
If Me.[checkbox1] = True And Me.MATRIX <> Aq Or CT = True Then
BBCNum = Me.BBCID
DoCmd.OpenTable "Table1a", acViewNormal
Table1a.AddNew
Table1a![LAB ID] = BBCNum
Table1a.Update
Table1a.Close
End If
End Sub
Thank you for any help!
Thanks! (This is my first encounter with both Access and VB)
Private Sub checkbox1_Exit(Cancel As Integer)
Dim BBCNum As Long
If Me.[checkbox1] = True And Me.MATRIX <> Aq Or CT = True Then
BBCNum = Me.BBCID
DoCmd.OpenTable "Table1a", acViewNormal
Table1a.AddNew
Table1a![LAB ID] = BBCNum
Table1a.Update
Table1a.Close
End If
End Sub
Thank you for any help!
Last edited: