Results 1 to 15 of 15
  1. #1
    Join Date
    May 2008
    Location
    Saginaw, Texas
    Posts
    26

    Unanswered: Help building form page

    Morning I need help building a form that has subform. And I might not be setting the form up correctly. The problem is I can make the sub-form display data from vendor selection combo box on main form but the need is to use that criteria selection then to select and add individually the data row to sub-form that will be used as a printed return form to that vendor. If I did not make it clear bear with me as I have taught myself how to build this application for use by our employees in order to retrieve purchase data for items (ie date, inv, price, qty part number, etc) being returned back to specific vendor. Thanks for your help ahead of time.
    "Discovery consist in seeing what everyone sees and thinking what nobody has thought"

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    I can't determine what it is that you actually want, so I can only generalise...

    Make a form. Make a subform. Make sure you have the linking field on both forms (initially). On your mainform, use the subform wizard to choose your subform. IF all is well, the wizard will do the tricky bit.
    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

  3. #3
    Join Date
    May 2008
    Location
    Saginaw, Texas
    Posts
    26
    Morning, Yes I have done such and did not get desired results. The form I am building is a return form from a data base I built to store outside vendor purchases. Now I have a form that stores the purchases properly. Our need now is a form and sub-form for returns. Main form selects vendor info and second form selects part info. I can display all part records fine. My problem is I need to select specific part not all the parts. This is where I get lost. I believe that a new table should store the part data being selected for return as opposed to using the original table that stores the purchase data. Is this correct? I can display all part data in sub form from specific vendor but wish to select only certain records that need to be returned. I hope this makes things a little clearer. Thanks
    "Discovery consist in seeing what everyone sees and thinking what nobody has thought"

  4. #4
    Join Date
    Sep 2007
    Location
    Global Village
    Posts
    185
    You should make another form or report, whatever you need, with all those data you need and in rowsource query, filter the part_id from your subform.
    Also put a button in the form/report for print data or save to file or e-mail it...
    Then in your subform put a code on dbl_click event for parts textbox to open the form/report i said above.
    The user can double click on each part he/she wants and see the information for that part and use it.
    Cheers
    <<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
    Graham Bell

  5. #5
    Join Date
    May 2008
    Location
    Saginaw, Texas
    Posts
    26
    Yes Sir I am building a new form with links for vendor ID (main form) and Part ID (sub-form). Main form has Vendor info and Sub-form has part ID along with info/data about part. I setup a query that uses combo from main form to restrict part data to that vendor. My issue comes from needing to select individually the parts not all the parts. The query displays all part data for that vendor in the sub form. Are you telling me I need to set form display properties to continuous form? And if so how do I get the additional text boxes to auto populate (ie: purchase date; purchase invoice; purchase price; etc)? Thanks
    "Discovery consist in seeing what everyone sees and thinking what nobody has thought"

  6. #6
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Main form has Vendor info and Sub-form has part ID along with info/data about part.
    Which tables are these forms feeding their data into? I ask this to try to find out some more about the structure of your tables. Without seeing it, I'm kinda flying blind here...

    My issue comes from needing to select individually the parts not all the parts. The query displays all part data for that vendor in the sub form.
    This sounds wrong to me. It sounds like your query here is pulling data in, rather than simply allowing data entry. You should have NO parts in a return until you add them using your combo box, which should be showing the sold items for the selected vendor.

    how do I get the additional text boxes to auto populate (ie: purchase date; purchase invoice; purchase price; etc)?
    Once you select a sold item for the vendor from your combo box, the related data should appear if your query is correct.
    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

  7. #7
    Join Date
    May 2008
    Location
    Saginaw, Texas
    Posts
    26

    Tbl Data

    I have attached gif images of the tables "data & structure", along with image of form I am trying to build for our returns. The table returns is empty and I believe it should get its data from entry into form. I am using a query that is based on outside purchases table with restriction of vendor/supplier selection to restrict part data only to that selected vendor for the combo part# selection. My problem occurs if I base subform on outside purchase table all parts are displayed, if I base subform on returns table no part data is displayed and when you select part # I get an error cannot add record.
    Thanks for you help.
    Attached Thumbnails Attached Thumbnails frm_Returns-sfrm_ReturnDetails.GIF   tbl_Returns.GIF   tbl_Suppliers.GIF   tbloutsidepurchase.GIF  
    "Discovery consist in seeing what everyone sees and thinking what nobody has thought"

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    So you need to base your subform on a query, not a table.

    The query needs to have tbl_Returns and tbl_outside_purchases. There should be a link between tbl_Returns.PurchaseID and tbl_outside_purchase.[ID Purchase].

    You need to change the link to a special join by double clicking the line itself in the query window. Then choose "Show all records from table tbl_Returns and..."

    Then add the fields and go from there. After using the combo box, you'll probably have to copy the contents from the outside purchases fields to your returns fields. You can do that with VBA in the AfterUpdate property for the combo box and use commands like:

    Me.ReturnsDate = Me.[Date]

    and so on.
    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

  9. #9
    Join Date
    May 2008
    Location
    Saginaw, Texas
    Posts
    26
    Morning, I am sorry not replying earlier as management duties required me to put other fires out first. I was not able to get the form to function as you suggested but have taken that info and made things function almost correctly. I put a unbound combo box on the sub-form which uses a new query with criteria for vendor info from combo selection off the main form. I then use the unbound combo selection on sub-form to select the part that was purchased only from that vendor/supplier. I then use the after-update feature on the combo selection with vba to update other fields on the sub-form by specifying combo and column number. The problem occurs when I move to next row source on the continuous sub-form it changes the previous record info. I am lost as to why this happens? Can you help to overcome this?
    "Discovery consist in seeing what everyone sees and thinking what nobody has thought"

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    The problem occurs when I move to next row source on the continuous sub-form it changes the previous record info.
    I'm not sure what you mean here... next row source? Changes the previous record?

    However, I think the combo box on the subform should be bound to PurchaseID.
    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

  11. #11
    Join Date
    May 2008
    Location
    Saginaw, Texas
    Posts
    26
    My meaning is this is a continuous form so when you have selected the part that is added and you move to next record/row source/ form the previous record that was selected on the record/row source/ form is changed to the current selection. I will change the tie from vendor/supplier ID to purchase ID and see how this affects my form. Thank you for the help.
    "Discovery consist in seeing what everyone sees and thinking what nobody has thought"

  12. #12
    Join Date
    May 2008
    Location
    Saginaw, Texas
    Posts
    26
    To make the issue clear here is a image of main form and sub form notice combo box in the top three selections.
    Attached Thumbnails Attached Thumbnails ReturnsForm.bmp  
    "Discovery consist in seeing what everyone sees and thinking what nobody has thought"

  13. #13
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Again, I believe that the combo box on the subform just needs to be bound to PurchaseID.
    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

  14. #14
    Join Date
    May 2008
    Location
    Saginaw, Texas
    Posts
    26
    Well StarTrekker, You can teach an old dog new tricks. If I had just done what you suggested to begin with my issues would have been resolved. I started from scratch with new quires and forms everything works as planned. Thanks again for you help.
    "Discovery consist in seeing what everyone sees and thinking what nobody has thought"

  15. #15
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    ^^ You're most welcome
    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
  •