combo box (1 Viewer)

steve111

Registered User.
Local time
Today, 06:42
Joined
Jan 30, 2014
Messages
429
hi

I have a table called stocklist and a table called stone type
the stocklist could have many parts the same but a different colour/type
at present the user has to look thro many records to select what he wants
I have been asked if it possible to have the stonetype list come up then when selecting that stocktype only parts from the stocklist are shown associated with that stocktype

at present in my subforms I have the product no which when selected bring the material description with it


is it possible in my subforms "quotes" and "orders"
a drop down box that first lists the stone type the when selected it list the
parts from the stocklist then when that is selected it then puts the product number and material description in as is now

I have attached a sample database for you to see
thanks steve
 

Attachments

  • subforms.accdb
    1.1 MB · Views: 47

llkhoutx

Registered User.
Local time
Today, 00:42
Joined
Feb 26, 2001
Messages
4,018
The parts combo box should be filtered by the stone type value and should be requeried after stone type selection.
 

steve111

Registered User.
Local time
Today, 06:42
Joined
Jan 30, 2014
Messages
429
hi ,
I have tried to do something like that. by trying to copy examples but failed.
and help appreciated

steve
 

HiTechCoach

Well-known member
Local time
Today, 00:42
Joined
Mar 6, 2006
Messages
4,357
hi

I have a table called stocklist and a table called stone type
the stocklist could have many parts the same but a different colour/type
at present the user has to look thro many records to select what he wants
I have been asked if it possible to have the stonetype list come up then when selecting that stocktype only parts from the stocklist are shown associated with that stocktype

at present in my subforms I have the product no which when selected bring the material description with it


is it possible in my subforms "quotes" and "orders"
a drop down box that first lists the stone type the when selected it list the
parts from the stocklist then when that is selected it then puts the product number and material description in as is now

I have attached a sample database for you to see
thanks steve

Steve,

What you are wanting is called cascading combo boxes. Unfortunately the do not work well in a form or sub form that is in continuous view or datasheet view.

I have tried different ways to get cascading combo boxes to work well on a continuous form but never got one to work that I liked.

What I use is a pop-up form to search for the item. This gives you the power to add multiple filtering and search options. I have also made some that will add multiple items at once.

Another option is to use a Add button that opens a form to add an item. This will allow you to use cascading combo boxes.
 

llkhoutx

Registered User.
Local time
Today, 00:42
Joined
Feb 26, 2001
Messages
4,018
I've never had a problem with cascading combo boxes to multiple levels. When any combo box change occurs, on the cbo_AfterUpdate event requery each of the "lower" filtered ones. Furthermore, a record source or data source is a table, query or a SQL string, either can be modified dynamically. A record source can be modified with a form Filter & FilterOn properties.
 

HiTechCoach

Well-known member
Local time
Today, 00:42
Joined
Mar 6, 2006
Messages
4,357
I've never had a problem with cascading combo boxes to multiple levels. When any combo box change occurs, on the cbo_AfterUpdate event requery each of the "lower" filtered ones. Furthermore, a record source or data source is a table, query or a SQL string, either can be modified dynamically. A record source can be modified with a form Filter & FilterOn properties.

What about a form in continuous view?

I agree it works great on a form showing a single record.
 

llkhoutx

Registered User.
Local time
Today, 00:42
Joined
Feb 26, 2001
Messages
4,018
Think about what you're asking. Modification of a record or data source works on any kind of form.

A recordset is a recordset, regardless of the number of records.
 

HiTechCoach

Well-known member
Local time
Today, 00:42
Joined
Mar 6, 2006
Messages
4,357
Think about what you're asking. Modification of a record or data source works on any kind of form.

A recordset is a recordset, regardless of the number of records.

I don't think you have actually tried it on a continuous form and experienced the display issue with other visible records.
 

llkhoutx

Registered User.
Local time
Today, 00:42
Joined
Feb 26, 2001
Messages
4,018
Attached is a simple form filtering a continuous form using 2 different methods: first using the form "filter" properties, the second modifying the form recordsource.

Take a look at the VBA code associated with the form, it's very simple and basic very.
 

Attachments

  • Database4.accdb
    768 KB · Views: 48

Users who are viewing this thread

Top Bottom