Results 1 to 8 of 8
  1. #1
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398

    Form Usage


    I can't figure out the best way to do this. I have two tables, one table containing merchants and the other table containing services. On the form that contains the merchant info, I need to display all of the records within the services table. I need the user to be able to select the services that apply to this merchant. I've thought about a list box because it allows the user to select multiple items to be applied to this merchant. I will then create another table which has the merchantid and the servicesid. I'll use this new table to confirm that this merchant is approved for this type of service.

    Any thoughts on the best way to do this?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You need a MainForm with the Merchant as the RecordSource and this MainForm has a SubForm of the services for this Merchant with the new table you are talking about as the RecordSource for the SubForm. The the "Service" control on the SubForm will be a ComboBox with the Services table as rthe RowSource. If you set it up right then the new table will end up containing it's own PrimaryKey (PK), the PrimaryKey of the Merchant table as a ForeignKey (FK) and PrimaryKey of the Services table as a ForeignKey (FK). Properly set up, Access will do all of the detail work for you *and* enforce Referential Integrity.

  3. #3
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    Thanks. I never thought of that. I'll give it a shot later tonight.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Post back here if you need further assistance after you give it a try.

  5. #5
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    I think what I've done is incorrect. Attached is a copy of the DB.

    Merchant table - wp_ebyz_merchant_info
    Merchant form - frm_Merchant_Info
    Product table - wp_cart66_products
    services sub-form - frm_Merchant_Info_subform
    table with services selected - wp_ebyz_product_matrix_merchant

    Per your instructions, I've created a sub form for the Merchant form. The sub-forms record source is the matrix table. Their is a combo box using the products table as the record source.

    So what I'm trying to do is have all the products displayed on the merchant form, with the merchant being able to select multiple products. Then with these selection a record is created within the matrix table. The user should be open to open the merchant form, select a merchant, and it will show all services available, and the previous ones selected designated.

    Thanks again!!

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Here's what I had in mind.

  7. #7
    crowegreg is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Posts
    398
    Very Nice. That works for me. Thanks!!

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

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

Similar Threads

  1. Inventory usage
    By txrules in forum Database Design
    Replies: 1
    Last Post: 12-30-2010, 12:35 PM
  2. Peak data usage of the day
    By Arty in forum Access
    Replies: 3
    Last Post: 11-11-2009, 03:23 AM
  3. Replies: 0
    Last Post: 09-25-2008, 12:19 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