P
Pam
Hi,
I'm trying to write code for a msgbox that has the data user wants to enter
in the msg of the box.
EX: Are you sure you want to enter "John Doe" as a contact?
So far I've entered every combination of .column, .value, quotations, and
field names (contactname and contactnamecombo) I can think of and nothing
works. I get the quotations to appear by themselves or with the name of the
combo box between - but not "John Doe".
Here's what I have:
Private Sub ContactNameCombo_NotInList(NewData As String, Response As
Integer)
On Error GoTo Err_ContactNameCombo_NotInList
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "fContactList"
If MsgBox("Are you sure you want to add """ & Me.ContactNameCombo.Column(2)
& """ as a contact?", vbYesNo, "Confirm Contact Entry") = vbYes Then
DoCmd.OpenForm stDocName, , , , acFormAdd, acDialog, NewData
Response = acDataErrAdded
Exit_ContactNameCombo_NotInList:
Exit Sub
Err_ContactNameCombo_NotInList:
MsgBox Err.Description
Resume Exit_ContactNameCombo_NotInList
End If
End Sub
I would very much appreciate any help available.
Thanks in advance.
Pam
I'm trying to write code for a msgbox that has the data user wants to enter
in the msg of the box.
EX: Are you sure you want to enter "John Doe" as a contact?
So far I've entered every combination of .column, .value, quotations, and
field names (contactname and contactnamecombo) I can think of and nothing
works. I get the quotations to appear by themselves or with the name of the
combo box between - but not "John Doe".
Here's what I have:
Private Sub ContactNameCombo_NotInList(NewData As String, Response As
Integer)
On Error GoTo Err_ContactNameCombo_NotInList
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "fContactList"
If MsgBox("Are you sure you want to add """ & Me.ContactNameCombo.Column(2)
& """ as a contact?", vbYesNo, "Confirm Contact Entry") = vbYes Then
DoCmd.OpenForm stDocName, , , , acFormAdd, acDialog, NewData
Response = acDataErrAdded
Exit_ContactNameCombo_NotInList:
Exit Sub
Err_ContactNameCombo_NotInList:
MsgBox Err.Description
Resume Exit_ContactNameCombo_NotInList
End If
End Sub
I would very much appreciate any help available.
Thanks in advance.
Pam