I’m not a professional developer, but sometimes I am developing some not very complicated databases to suite my needs. Now I try to upgrade a database that I have developed years ago, which I use every day and everything works just fine. It is a MS Access 2003 database. I need to set up two combobox controls to work together. Since my form has two subforms and a lot of other controls I desided to test the code first on a simple trial form with the two comboboxes only. Everything works fine but when I try to transfer the code to my actual form I get the following error message: The expression After Update you entered as the event property setting produced the following error: A problem occurred while <MyDatabaseName> was communicating with the OLE server or ActiveX Control
Both comboboxes are located on the main form and this is the code that I am trying to run:
Private Sub cboType_AfterUpdate()
Me.cboCategory = 0
Me.cboCategory = Me.cboCategory.ItemData(0)
cboType is the first combobox and cboCategory is the second one
What am I doing wrong?