Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 28th, 2004, 06:39 AM
paulf paulf is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 2 paulf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old February 28th, 2004, 02:51 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 13
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-

Reply With Quote
  #3  
Old February 28th, 2004, 10:26 PM
paulf paulf is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 2 paulf User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thumbs up

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?

Reply With Quote
  #4  
Old February 29th, 2004, 11:57 PM
sbaxter sbaxter is offline
Moderator: Access, SQL
ASP Free God (5000 - 5499 posts)
 
Join Date: Oct 2003
Posts: 5,126 sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level)sbaxter User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 1 h 2 m 51 sec
Reputation Power: 13
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-

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Diff Subforms for diff drop down items


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT