Hello,
I am trying to use a check box on exit function to open a table, add a new record, save the Lab ID in this new record, and close the table. But when I run it I get nothing in my table. Help please!
Private Sub Ctl6_Functional_Groups___Enum_Diversity_Exit(Cancel As Integer)
Dim BBCNum As Long
If Me.[6 Functional Groups - Enum+Diversity] = True & Me.MATRIX <> Aq Or CT = True Then
BBCNum = Me.BBCID
DoCmd.OpenTable "Table1a", acViewNormal
DoCmd.GoToRecord , , acNewRec
[Forms]![Table1a].[LAB ID] = BBCNum
DoCmd.Close acForm, "Table1a"
End If
End Sub
I am trying to use a check box on exit function to open a table, add a new record, save the Lab ID in this new record, and close the table. But when I run it I get nothing in my table. Help please!
Private Sub Ctl6_Functional_Groups___Enum_Diversity_Exit(Cancel As Integer)
Dim BBCNum As Long
If Me.[6 Functional Groups - Enum+Diversity] = True & Me.MATRIX <> Aq Or CT = True Then
BBCNum = Me.BBCID
DoCmd.OpenTable "Table1a", acViewNormal
DoCmd.GoToRecord , , acNewRec
[Forms]![Table1a].[LAB ID] = BBCNum
DoCmd.Close acForm, "Table1a"
End If
End Sub
Last edited: