I
iholder
I am having trouble adding a record to the list. The list source is a is
query called "qryCountries" on a ComboBox control. The coding is:
Private Sub Country_NotInList(NewData As String, Response As Integer)
Dim ctl As Control
' Return Control object that points to combo box.
Set ctl = Me!Country
' Prompt user to verify they wish to add new value.
If MsgBox("Value is not in list. Add it?", _
vbYesNo) = vbYes Then
' Set Response argument to indicate that data
' is being added.
Response = acDataErrAdded
' Add string in NewData argument to row source.
ctl.RowSource = ctl.RowSource & ";" & NewData
Else
' If user chooses Cancel, suppress error message
' and undo changes.
Response = acDataErrContinue
ctl.Undo
End If
End Sub
I am getting an error message as follows:
"The record source "qryCountries.Africa" specified a this form does no
exist.
Note: The ComboBox is bound to a field called Country is another table
called "tblParkingSpaces."
Africa is the country being added to the list.
Help defining the cause of the problem.
Thank You
Ileana
query called "qryCountries" on a ComboBox control. The coding is:
Private Sub Country_NotInList(NewData As String, Response As Integer)
Dim ctl As Control
' Return Control object that points to combo box.
Set ctl = Me!Country
' Prompt user to verify they wish to add new value.
If MsgBox("Value is not in list. Add it?", _
vbYesNo) = vbYes Then
' Set Response argument to indicate that data
' is being added.
Response = acDataErrAdded
' Add string in NewData argument to row source.
ctl.RowSource = ctl.RowSource & ";" & NewData
Else
' If user chooses Cancel, suppress error message
' and undo changes.
Response = acDataErrContinue
ctl.Undo
End If
End Sub
I am getting an error message as follows:
"The record source "qryCountries.Africa" specified a this form does no
exist.
Note: The ComboBox is bound to a field called Country is another table
called "tblParkingSpaces."
Africa is the country being added to the list.
Help defining the cause of the problem.
Thank You
Ileana