A
Alan T
In main form:
Private Sub btnOpen_Click()
DoCmd.OpenForm "frmEmployee", acNormal, , , acFormAdd, acWindowNormal,
"Alan"
End Sub
In second form:
Private Sub Form_Open(Cancel As Integer)
Dim empName As String
empName = Forms!frmEmployee.OpenArgs <-- runt time error
If Len(empName ) > 0 Then
MsgBox empName
Else
MsgBox "null"
End If
End Sub
The runtime error was:
Invalid use of NULL
Private Sub btnOpen_Click()
DoCmd.OpenForm "frmEmployee", acNormal, , , acFormAdd, acWindowNormal,
"Alan"
End Sub
In second form:
Private Sub Form_Open(Cancel As Integer)
Dim empName As String
empName = Forms!frmEmployee.OpenArgs <-- runt time error
If Len(empName ) > 0 Then
MsgBox empName
Else
MsgBox "null"
End If
End Sub
The runtime error was:
Invalid use of NULL