Hi,
I have created some cascading comboboxes, using this tutorial:
//blogannath.blogspot.ca/2011/04/microsoft-access-tips-tricks-cascading.html
Worked like a charm.
Lately, I decided to change the structure of my database, starting from scratch again, using plenty of related tables instead of everything in a few tables. Now I used the same method for cascading combo boxes, but Access pops an error message when I try my form. Since I have ID numbers instead of the actual data in the source table of my comboboxes, I suspected that my problem could be there, but couldn't find a hint on how to fix it yet. See attachments for screenshots.
Code:
Private Sub cboGeoLocID_AfterUpdate()
On Error Resume Next
cboSiteLocID.RowSource = " SELECT DISTINCT SiteLocID " & _
"FROM UniqLoc " & _
"WHERE GeoLocID = '" & cboGeoLocID & "' " & _
"ORDER BY SiteLocID"
End Sub
Suggestions would be much appreciated.
KingBroil
I have created some cascading comboboxes, using this tutorial:
//blogannath.blogspot.ca/2011/04/microsoft-access-tips-tricks-cascading.html
Worked like a charm.
Lately, I decided to change the structure of my database, starting from scratch again, using plenty of related tables instead of everything in a few tables. Now I used the same method for cascading combo boxes, but Access pops an error message when I try my form. Since I have ID numbers instead of the actual data in the source table of my comboboxes, I suspected that my problem could be there, but couldn't find a hint on how to fix it yet. See attachments for screenshots.
Code:
Private Sub cboGeoLocID_AfterUpdate()
On Error Resume Next
cboSiteLocID.RowSource = " SELECT DISTINCT SiteLocID " & _
"FROM UniqLoc " & _
"WHERE GeoLocID = '" & cboGeoLocID & "' " & _
"ORDER BY SiteLocID"
End Sub
Suggestions would be much appreciated.
KingBroil