W
William
I have a table (Countries) that contains 2 fields
(Country, City).
I'd like to utilize the DLookup in conjunction with the
AfterUpdate event.
I found the function below in the Northwind db; however,
it still does not work after updating the naming
convention (tables, fields, etc.).
Right now, when clicking the COUNTRY field, I get the
following error:
"You canceled the previous operation."
Does anyone know what's the missing link?
Regards,
William
Private Sub Country_AfterUpdate()
On Error GoTo Err_Country_AfterUpdate
Dim strFilter As String
strFilter = "Country = " & Me!Country
Me!City = DLookup("City", "Countries", strFilter)
Exit_Country_AfterUpdate:
Exit Sub
Err_Country_AfterUpdate:
MsgBox Err.Description
Resume Exit_Country_AfterUpdate
End Sub
(Country, City).
I'd like to utilize the DLookup in conjunction with the
AfterUpdate event.
I found the function below in the Northwind db; however,
it still does not work after updating the naming
convention (tables, fields, etc.).
Right now, when clicking the COUNTRY field, I get the
following error:
"You canceled the previous operation."
Does anyone know what's the missing link?
Regards,
William
Private Sub Country_AfterUpdate()
On Error GoTo Err_Country_AfterUpdate
Dim strFilter As String
strFilter = "Country = " & Me!Country
Me!City = DLookup("City", "Countries", strFilter)
Exit_Country_AfterUpdate:
Exit Sub
Err_Country_AfterUpdate:
MsgBox Err.Description
Resume Exit_Country_AfterUpdate
End Sub