Page 1 of 4 123 ... LastLast
Results 1 to 15 of 47
  1. #1
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    subforms (Access 2000)

    Hi,

    I'm a relatively new Access user and am building my first database from scratch. I have a main form with 2 subforms and am having difficulty formatting the subforms. Do they have to be formatted before being added to the main form?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: subforms (Access 2000)

    Welcome to Woody's Lounge!

    You can modify subforms before and after adding them to the main form. If you can post a reply in this thread with some details about the difficulties you experience, I am sure someone will be willing to help you.

  3. #3
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    It helps to have the subforms created before you "embed" them in the main form. This way, when the add subform wizard (if you choose to use it) asks for the subform, you can select it from the list. You can create a "placeholder" subform object (without the wizard) on your main form without assigning it to an existing form and then assign the "Source Object" property of this subform object (with the name of you subform) later after you create your subform .

    I usually create the subforms first (as if they were standalone forms), play around with them to make them look (and work) right. Once they behave properly, then I create the parent form (or add the subform object to an existing form), assign the name of my subform to the Source Object property, and establish the links, if necessary.

    Access 2000 lets you design (edit) your subform as it appears embedded on the main form, but I prefer to modify it in it's standalone form (open it for design separately) as the viewable area on the main form is often limited.

    Hope this helps.

  4. #4
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    Thanks for the replies-I've got the subforms created as standalone forms and am playing around with adding them to the main form but I'm not getting it quite right, so am just deleting them from the main form and starting over. I'm probably wasting a lot of time (I tend to want to reinvent the wheel) but am learning a little bit more each time. I'll work on it some more and see what I come up with and let you know.

    Thanks again,
    Gabi

  5. #5
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    Gabi,

    "Getting it quite right" with subforms often depends largely on whether you've got the Link Master Fields and Link Child Fields (as well as the underlying tables) set up right. But this depends on how you plan to use the subforms. As Hans suggested, if you describe the symptoms in a little more detail, I bet one of the Lounge doctors can prescribe some wonder medication.

  6. #6
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    Well, I'll do the best I can. Remember, I'm new to this, so I know these will seem like silly things! The database is for registering people for an upcoming conference. I have a "students" table, "faculty" table, "classes" table, "billing table". The main form is for the names, addresses, etc. of the students. The subforms are for the classes and billing info. All the relationships have been correctly established. Bascially, I'm having problems getting the subforms sized and fitted properly on the main form, and when I'm in Form View, the bottom half of the subforms is not viewable. Any ideas?

  7. #7
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    Are you using your classes subform to list the classes? If so, is it set to Continuous Forms? With this approach, you can size to subform object on your main form (just grab and stretch it) to a size that shows however many rows you want to see at a time (you'll need to make sure Scroll Bars on the subform is set to Vertical or Both so that you can get to the other ones.

    If your subforms are "Single Form", then you just need to stretch your subform object on your main form to match (or exceed) the size of your subform (including record selectors, navigation buttons, etc. that you may have).

    Does this help?

  8. #8
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    You guys are a Godsend! I'm still working on it, I'll let you know when I run into more problems (which I know I will!) <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: subforms (Access 2000)

    In addition to Tom's very useful remarks: if you select one of the subforms on the main form, you can then double click the square dot in the middle of the right hand border of the subform to "autosize" the width of the subform. Analogously for the square dot in the bottom border, and the square dot in the lower right corner - these are mostly useful if you have a single form, less so if you have a continuous subform.

  10. #10
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    Hi again!
    Okay, I've got everything set up in design view, but when I switch to form view, the whole thing is blank! All that is showing up is the background color. I check the form property for the allowable views and have it set to "both", what am I doing wrong???

  11. #11
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    Here's another one: I added a field to my underlying table and it's not showing up in the fields list to add to my form-Can't find anything in my help menu

  12. #12
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    If there is no query as the form's recordsource then closing and reopening the form will refresh the list. If there is a query then you need to add the field to the query.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  13. #13
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    A blank form usual indicates that there is no Data for it to display. Check that your record source is returning data.

    HTH

    Peter

  14. #14
    3 Star Lounger
    Join Date
    May 2003
    Location
    Sacramento, California, USA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    Hi,
    Thanks for your response. I'm beginning to think maybe I'm going about this the wrong way. With several underlying tables, is it best to do a query and use it as the record source for the form, or to create subforms for the additional underlying tables?

  15. #15
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: subforms (Access 2000)

    That kind of depends on what you want the form to do.

    I usually use subforms when I have a "junction table" to handle a many-to-many relationship between two tables. Access Help's example is a order table with a many-to-many relationship with a product table -- you create an intermediate table where each record has a foreign key to an order and one to a product). The form to support this arrangement could be a parent form (single form view) that shows the orders and a subform (continuous forms view) that shows the products on that order. The Record Source for the parent table is the Order table; the Record Source for the sub form is the junction table (or a query that includes the junction table linked to the product table to pick up information you want displayed (or want to change) for the related product. This gives you the flexibility to add and remove related records (products on the order). Also, if you have several many-to-many relationships (e.g., suppose the order needs to contain a list of one or more recipients) that you want the form to handle, you're best bet is to use subforms.

    Using a query as a record source for a form (without a subform) works fine (and is easier to implement) when you have just a many-to-one relationship (e.g., the order table might be linked to the customer table with a many-to-one relationship; i.e., each order is linked to one and only one customer). Here you may just want to pick up information to include on the form (e.g., customer name and address to be included on the order form). You need to be careful, though, to make sure your query is updatable (i.e., isn't based on aggregate functions or other calculated fields) if you want to be able to change information on the form.

    I hope this helps a little.

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •