G
Guest
Hi!
I have a combo box on a form, and I want to be able to add something to the
table it's getting the values from if they type in something that's not on
the list. I put this code on the combo box:
Private Sub ProjNumCombo_NotInList(NewData As String, Response As Integer)
If MsgBox("Do you want to add a project number to the list?", _
vbDefaultButton1 + vbYesNo) = vbYes Then
DoCmd.OpenForm "frmAddProject", , , , acFormAdd, acDialog
Response = acDataErrAdded
Else
Response = acDataErrContinue
Me!ProjNumCombo = Null
Me!ProjNumCombo.Dropdown
End If
End Sub
This code works and asks if I want to add the new project number. But...
when it brings up the form "frmAddProject" the form is completely blank.
There isn't a space to type in the project number and the command button to
add the project number isn't there. When I open the form independently it
opens just fine and everything displays. Can anyone think of what's going on?
Thanks!
Heather
I have a combo box on a form, and I want to be able to add something to the
table it's getting the values from if they type in something that's not on
the list. I put this code on the combo box:
Private Sub ProjNumCombo_NotInList(NewData As String, Response As Integer)
If MsgBox("Do you want to add a project number to the list?", _
vbDefaultButton1 + vbYesNo) = vbYes Then
DoCmd.OpenForm "frmAddProject", , , , acFormAdd, acDialog
Response = acDataErrAdded
Else
Response = acDataErrContinue
Me!ProjNumCombo = Null
Me!ProjNumCombo.Dropdown
End If
End Sub
This code works and asks if I want to add the new project number. But...
when it brings up the form "frmAddProject" the form is completely blank.
There isn't a space to type in the project number and the command button to
add the project number isn't there. When I open the form independently it
opens just fine and everything displays. Can anyone think of what's going on?
Thanks!
Heather