Dropdown Boxes - Coding

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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-
 
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]
 
Thanks for the fast reply.
That works, almost perfectly.

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

Thanks.

Ofer said:
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]

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-
 
Got it.
Private Sub cmdPack_GotFocus()
Me.cmdPack.Requery
End Sub


Cheers
-MK-

-MK- said:
Thanks for the fast reply.
That works, almost perfectly.

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

Thanks.

Ofer said:
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]

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-
 
Back
Top