List Box

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

Guest

Hi,

I have a form that right now when I enter a stock code it takes to my list
box with the same stock code. However, now I need to be able to enter a
Product class and with that product class I need the list box to go to the
first stock code in that particular product class. Any suggestions?

Thanks
Linda
 
Linda

We're not there -- we can't see how you've set up your form.

It sounds like you might be trying to use the selection in a combo box
(?Product Class) to filter what gets displayed in a list box (?stock codes).
If so, check here in the newsgroups, at Google.com, and at mvps.org on the
topic of "Cascading Combo Boxes".

Good luck!

Jeff Boyce
<Office/Access MVP>
 
I got the list box to work but now I have another problem. When I click on
the item in the list box, I would like my subform to display the information
for that item and it does not. Is there a way to do this?
 
Linda

Again, we're not there, we don't know how you've "wired" your form.

How have you connected your subform to your mainform? How does your subform
"know" it is supposed to refresh itself?

You could add code in the AfterUpdate event of the listbox. In your code,
you could requery the subform.

Regards

Jeff Boyce
<Office/Access MVP>
 
Sorry about that, the main form calls in the subform ( i used the subform
tool)
The list box receives it's info from tables that I have created.
When I click on an item in the list box, I would like the info from the
subform to appear for that item.

Thanks
Linda
 
I don't know what you mean/did to have "the main form call in the subform".

What are the parent/child fields you have linking the main form and subform?

When you select an item from your listbox, how does the subform "know" which
item has been selected? Where are you telling it that?

Regards

Jeff Boyce
<Office/Access MVP>
 
I have the stock code field as the links but in my drop down box, I have the
prd cls field. I need for the user to choose a product class and then the
list box to go to the first stock code in that product class. I then want to
be able to click on the stock code in the list box and have the subform
display all the info pertaining to the stock code.

I chose the tool subform on my main form and enter the syubform name in the
property to tell it this is where to look for the info.
 
Linda

I haven't seen your data structure, so I have no idea what "stock code"
means or "prd cls", or if this is the same as "product class".

Instead of talking about the form, let's talk about the underlying data. Am
I correct in assuming that you have a product class (?is that something like
a category)? And each product class can have zero-to-many stock code items?
And each stock code item has one-to-many row of some kind of information?

If you data fits this description, then I can see why you have a form as
you've described.

But if you only have a single "collection" of information about a stock
code, why are you using a subform? Subforms are great for displaying
multiple lines (i.e., a one-to-many relationship).

Please tell us more about your data, not your form...

Regards

Jeff Boyce
<Office/Access MVP>
 
Back
Top