Hi,
I have a form where I am passing the values on a click routine to another form. If the fields aren't filled in upon passing I get an error message that the field is null. Can I fix this so the values being passed can be null? THank you for any input!! Here is my code.
Private Sub Check68_Click()
Dim CN As String
Dim CSID As String
Dim BBCNum As Long
Dim Mx As String
CN = Me.CompanyName2
CSID = Me.ClientSampleID
BBCNum = Me.BBCID
Mx = Me.MATRIX
DoCmd.OpenForm "Sheet12"
[Forms]![Sheet12].Text3 = CN
[Forms]![Sheet12].Text5 = CSID
[Forms]![Sheet12].Text1 = BBCNum
[Forms]![Sheet12].Text7 = Mx
DoCmd.PrintOut acPrintAll, , , acHigh, 1, True
DoCmd.Close acForm, "Sheet12"
End Sub
I have a form where I am passing the values on a click routine to another form. If the fields aren't filled in upon passing I get an error message that the field is null. Can I fix this so the values being passed can be null? THank you for any input!! Here is my code.
Private Sub Check68_Click()
Dim CN As String
Dim CSID As String
Dim BBCNum As Long
Dim Mx As String
CN = Me.CompanyName2
CSID = Me.ClientSampleID
BBCNum = Me.BBCID
Mx = Me.MATRIX
DoCmd.OpenForm "Sheet12"
[Forms]![Sheet12].Text3 = CN
[Forms]![Sheet12].Text5 = CSID
[Forms]![Sheet12].Text1 = BBCNum
[Forms]![Sheet12].Text7 = Mx
DoCmd.PrintOut acPrintAll, , , acHigh, 1, True
DoCmd.Close acForm, "Sheet12"
End Sub