B
bfreeman
Hi all,
I am receiving an error from my combo box. I set it up to be able t
double-click the drop-down and it opens a form so you can ad
information to it.
The error reads as follows:
"You tried to assign the Null value to a variable that is not a Varian
data type."
Basically, all the drop down is physician names and when one i
selected the fields (salutation, name, phone, etc.) are displayed. T
add additional physicians is my goal. My code is below:
Private Sub Form_Load()
If Me.OpenArgs = "GotoNew" And No
IsNull(Me![Volunteers_PhysicianID]) Then
DoCmd.DoMenuItem acFormBar, 3, 0, , acMenuVer70
End If
End Sub
Private Sub Volunteers_PhysicianID_NotInList(NewData As String
Response As Integer)
MsgBox "Double-click this field to add an entry to the list."
Response = acDataErrContinue
End Sub
Private Sub Volunteers_PhysicianID_DblClick(Cancel As Integer)
On Error GoTo Err_Volunteers_PhysicianID_DblClick
Dim lngVolunteers_PhysicianID As Long
If IsNull(Me![Volunteers_PhysicianID]) Then
Me![Volunteers_PhysicianID].Text = ""
Else
lngVolunteers_PhysicianID = Me![Volunteers_PhysicianID]
Me![Volunteers_PhysicianID] = Null
End If
DoCmd.OpenForm "Physician", , , , , acDialog, "GotoNew"
Me![Volunteers_PhysicianID].Requery
If lngVolunteers_PhysicianID 0 Then Me![Volunteers_PhysicianID]
lngVolunteers_PhysicianID
Exit_Volunteers_PhysicianID_DblClick:
Exit Sub
Err_Volunteers_PhysicianID_DblClick:
MsgBox Err.Description
Resume Exit_Volunteers_PhysicianID_DblClick
End Sub
Any suggestions or solutions are appreciated. Thanks in advanced.
-Free
I am receiving an error from my combo box. I set it up to be able t
double-click the drop-down and it opens a form so you can ad
information to it.
The error reads as follows:
"You tried to assign the Null value to a variable that is not a Varian
data type."
Basically, all the drop down is physician names and when one i
selected the fields (salutation, name, phone, etc.) are displayed. T
add additional physicians is my goal. My code is below:
Private Sub Form_Load()
If Me.OpenArgs = "GotoNew" And No
IsNull(Me![Volunteers_PhysicianID]) Then
DoCmd.DoMenuItem acFormBar, 3, 0, , acMenuVer70
End If
End Sub
Private Sub Volunteers_PhysicianID_NotInList(NewData As String
Response As Integer)
MsgBox "Double-click this field to add an entry to the list."
Response = acDataErrContinue
End Sub
Private Sub Volunteers_PhysicianID_DblClick(Cancel As Integer)
On Error GoTo Err_Volunteers_PhysicianID_DblClick
Dim lngVolunteers_PhysicianID As Long
If IsNull(Me![Volunteers_PhysicianID]) Then
Me![Volunteers_PhysicianID].Text = ""
Else
lngVolunteers_PhysicianID = Me![Volunteers_PhysicianID]
Me![Volunteers_PhysicianID] = Null
End If
DoCmd.OpenForm "Physician", , , , , acDialog, "GotoNew"
Me![Volunteers_PhysicianID].Requery
If lngVolunteers_PhysicianID 0 Then Me![Volunteers_PhysicianID]
lngVolunteers_PhysicianID
Exit_Volunteers_PhysicianID_DblClick:
Exit Sub
Err_Volunteers_PhysicianID_DblClick:
MsgBox Err.Description
Resume Exit_Volunteers_PhysicianID_DblClick
End Sub
Any suggestions or solutions are appreciated. Thanks in advanced.
-Free