Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / March 2006

Tip: Looking for answers? Try searching our database.

AfterUpdate Combo Boxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karl - 31 Mar 2006 21:21 GMT
Hello,
I have two combo boxes. On the main form (Form 1) is a Category combo box.
On the subform (Form 2) is a Product combo box. Using a where query I have
set it up so the Product 2 combo box is based on the category combo box. This
works fine for the first choice. I.e. the first time i open the form and
choose a category the appropriate products appear in the combo box but when i
choose a different categories the products combo box doesn't update. I've got
it to work when both combo boxes are the main form using this AfterUpdate
event:

Private Sub CategoryAfterUpdate()
Me.Product = Null
Me.Product.Requery
Me.Product = Me.Product.ItemData(0)
End Sub

However I can't figure out how to adjust this event too look for product in
the subform (Form2) (instead of on the main form).

At this time both of these combo boxes are unbound.  However it would be
better for me if they were bound (i.e Bind Categories to the Categories table
(which contains Category ID and Category Name and Bind Products to the
Products table (which contains product id, product name and category ID). Is
it possible to have these combo boxes bound and still use this method for
looking up products based on the categories.

I'll also want to add a subform to form2 that shows properties of the
products, but am hoping it will link through child and master link fields. Do
you think this will work.

Thanks in Advance,
Marshall Barton - 01 Apr 2006 00:55 GMT
Didn't I answer this question in another newsgroup?
Signature

Marsh
MVP [MS Access]

>Hello,
> I have two combo boxes. On the main form (Form 1) is a Category combo box.
[quoted text clipped - 27 lines]
>
>Thanks in Advance,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.