Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2009
    Posts
    67

    Unanswered: Subform question please

    I have main form and subform is it possible to have them side by side instead of at the bottom of each other. there is about 50 lines for the form and I want to be able to see all of them on the screen. I'm new to access so I'm not even sure if this makes sense.

    Thanks

  2. #2
    Join Date
    Mar 2007
    Posts
    277
    You can put a SubForm control any where you want on a form. Maybe I don't understand your question.
    RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP, ac07, ac10 - WinXP Pro, Win7 Pro
    Please reply to this forum so all may learn.

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Subforms can only be fit within a main form. You can 2,3,4 etc... subforms within a main form. Listboxes is also a good choice to have within a main form. So for example, within your main form you can have 1,2,3 etc...listboxes and 1,2,3 etc.. subforms (like any controls).

    A subsubform is a form within a subform. You have to size the subsubform correctly to fit into the widths of the subform. If you go this route, unfortunately your stuck with your subform only being able to view 1 record at a time - ie. you can't make it continuous (which makes sense since the subsubform doesn't know what records belong to the many records listed in the subform.)

    One scenario I like to use is where your main form is "unbound" (ie. the recordset is blank) and you put your "search" boxes on this form. You could then have a button (or use the afterupdate event in the search box) to requery the listboxes/subforms. (Note: The recordsource of your listboxes/subform's have criteria which might be =Like!Forms!MyMainFormName!MySearchBox & "*") for whatever fields you want to search upon. This way you just have to issue a requery command to each listbox/subform when the searchbox is updated or button is pushed. The same kind of query criteria can apply to subsubforms. I like to use the query criteria method (and set the default value on the subform/subsubform =Forms!MyMainFormName!IDFieldName) versus relying on the linkchildfields and linkmasterfields which you would set by clicking the subform (while in design mode on the mainform) and then change in the properties box.

    Another scenario is to have a mainform (ie. data entry/editing form) which then has a subform on it. The mainform is bound and has all your "main table" data on it. The query for the subform would then have criteria in like the above scenario. Your searchbox on the mainform when updated (or a button pushed) would then simply requery the mainform and subform. Listboxes are great for showing a lot of records (ie. 50+ records). You can even program events to happen when the listbox is clicked (ie. AfterUpdate event) such as requery a form/subform/subbform. The only issue with listboxes is that it's time-consuming to get the sizing of the fields the right widths.

    There are many different scenario's depending on your needs.
    Last edited by pkstormy; 06-07-09 at 21:50.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Apr 2009
    Posts
    67
    Pksormy,

    Thank you for your reply but what you just mentioned is way out of my leage since I'm just beginning is it possible that I post my data here and what I did so far.

    Thanks

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Sure. Just zip up your db and upload it.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Apr 2009
    Posts
    67
    Hi Startrekker,
    Here is the file basically the QrySales form what I like to see is all 49 cards that active the previous day in form so I can enter current day's ending number. The reason I like to see the previous day is in case bundle sold out I like to enter the ending number also.

    Thanks
    Attached Files Attached Files
    Last edited by hmho; 06-08-09 at 23:26.

  7. #7
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Bah. I am not at a computer with anything better than Access 97 atm ^^

    Hopefully I'll remember this topic when I get back to my office
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    All too easy. RuralGuy is correct. You can just place that subform object on the right and make it rather tall in size and you will have what you want
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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