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 / August 2005

Tip: Looking for answers? Try searching our database.

Dropdown Boxes - Coding

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
-MK- - 04 Aug 2005 19:31 GMT
Hi there,
Need some assistance.

Ill try my best to explain this without a visual.
I have a dropbox which lists "products", for example.
and I have another dropbox which lists the "package" of the "product".

When the user selects the product in the first dropdown box, I need some
help in narrowing down the "packages" so that it only lists the "packages"
that are linked, or related to the selected "product".
Right now, the dropdown box that has the "packages" lists all the packages
for all the products.

Heres what I got for ROW SOURCE:
SELECT DISTINCT AaMaster.Package FROM AaMaster;

Thanks.
-MK-
Ofer - 04 Aug 2005 19:34 GMT
Chenge the ROW SOURCE to filter on product using the field in the form
SELECT DISTINCT AaMaster.Package FROM AaMaster Where MyProduct =
Forms![FormName]![ProductFieldName]

On the after update event of product write the code
me.PackageComboName.requery

> Hi there,
> Need some assistance.
[quoted text clipped - 14 lines]
> Thanks.
> -MK-
-MK- - 04 Aug 2005 19:48 GMT
Thanks for the fast reply.
That works, almost perfectly.

When I change the first dropdown box, the second doesnt update?

Thanks.

> Chenge the ROW SOURCE to filter on product using the field in the form
> SELECT DISTINCT AaMaster.Package FROM AaMaster Where MyProduct =
[quoted text clipped - 21 lines]
> > Thanks.
> > -MK-
-MK- - 04 Aug 2005 19:54 GMT
Got it.
Private Sub cmdPack_GotFocus()
Me.cmdPack.Requery
End Sub

Cheers
-MK-

> Thanks for the fast reply.
> That works, almost perfectly.
[quoted text clipped - 28 lines]
> > > Thanks.
> > > -MK-
 
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.