Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 16th, 2012, 02:14 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help!! Help!! Help!!

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.Requery
Me.cboCategory = Me.cboCategory.ItemData(0)
End Sub

cboType is the first combobox and cboCategory is the second one

What am I doing wrong?






Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.