Results 1 to 2 of 2
  1. #1
    Katiemay is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2013
    Posts
    3

    Populating forms with subforms

    Hi folks,

    I apologize if this question has been asked before, I am very new to Access and my terminology is not exactly perfect, so searching for what I'm trying to do is proving difficult.

    Basically, this is what I want to do. I want to have a form listing customer information, where one of the fields is "Program Placement". I want the Program Placement box to be a drop down box (figured that part out), but I want a separate set of fields to appear, depending on which program was selected.

    Does that make sense? Thanks for any advice!



    -Katie

  2. #2
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    You have a couple of different options to accomplish that. For both methods, you'd use the AfterUpdate event of your combo box to set up the interface for the user.

    First, and possibly easiest, you could use different subforms on the main form. Before Placement is chosen, part of the form appears blank, or has a subform with the fields that are always present. When they choose PlacementX, you hide (or unload) the subform that was there, and load (or make visible) the subformX you want. When they choose PlacementY, you hide (or unload) the subform that was there, and load (or make visible) the subformY you want.

    The second way you can do it, if the different formats are actually almost the same, is to hide and show individual controls based upon the choice in the combo box. I'm assuming from your question that you need more change than that.

    WEB REFERENCES:

    Examples - Jon Lewis provided some examples of how to make this work on this thread: http://www.pcreview.co.uk/forums/cha...-t3989433.html

    Best Resource - Danny Lesandrini wrote the method up thoroughly here - http://www.databasejournal.com/featu...ynamically.htm

    Scott Diamond has some notes here http://www.utteraccess.com/forum/Dis...-t1265454.html where he mentions how to make the subform look like it's part of the main form.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Forms and Subforms
    By jlgray0127 in forum Forms
    Replies: 3
    Last Post: 04-11-2013, 02:24 PM
  2. Replies: 5
    Last Post: 01-16-2013, 03:48 PM
  3. Replies: 5
    Last Post: 10-27-2011, 01:00 PM
  4. forms and subforms
    By phineas629 in forum Forms
    Replies: 4
    Last Post: 10-05-2011, 02:46 PM
  5. Help with Forms and Subforms
    By xstaceyid in forum Forms
    Replies: 1
    Last Post: 04-21-2011, 02:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums