|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Diff Subforms for diff drop down items
Hi all. Not sure if this is possible, but it would help me a great deal.
I have a table with about 300 entries. This table is cut up into 6 different products. I have a form that is used for the data entry, in that form is a drop down box used to choose which product the primary key Serial Number is. What I want is that when I choose each different option from the drop down box, it inserts a sub form for the appropriate product. The forms used for the sub forms have been created from queries of the 300 entry table I first mentioned. Or is there a diff way to do this? I've been away from Access from a long time, so I'm still a little rusty. I'm also using Access 2003. |
|
#2
|
|||
|
|||
|
One quick and dirty way would be to create six different subforms, put them all on you main form with a property of visible = false and depending on which item is selected you will display the proper subform (check the visible property to true)
Theere are other ways to do what you want, but without know exactly what you system looks and acts like... this will work S- |
|
#3
|
|||
|
|||
|
Ok for this drop down box, Row Source Type is Value List. Row Source is "Product 1";...;"Product 6"
How, when clicking on each product in the drop down box, would I set the visible property for each sub-form? Macro? Code builder? I don't know any VB. Thanks for your help with this If I was to hide them, I would probably have to scroll down the form to see the 6th Sub-form? |
|
#4
|
|||
|
|||
|
First You put each subform on top of each other (so you don't have to looking for them once you make them visible)
VB Code in the after update event of drop down Code:
Select Case ME.DropDown Case = "Product1" ME.subform1.visible = true ME.subform2.visible = false ME.subform3.visible = false ME.subform4.visible = false ME.subform5.visible = false ME.subform6.visible = false Case = "Product2" ME.subform1.visible = false ME.subform2.visible = true ME.subform3.visible = false ME.subform4.visible = false ME.subform5.visible = false ME.subform6.visible = false . . . . End Select S- |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Diff Subforms for diff drop down items |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|