Results 1 to 3 of 3
  1. #1
    DuWayne is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    8

    Use a button to create a query on the fly


    I have all (30) of my databases set up that contain manufacturing bom's. My form is set up, now I need to code a button on my form to open a msgbx with a combo box that brings up a list of all my databases. Another field to enter a serial no. of the bom, then have it to select the table, run a query that table and select (5) fields from that table. All tables are exactly the same. Query selects (5) fields: fbompart, fitem, fbomdesc, fbommeas, ftotqty. In fitem all the parts I want to pull out it has an "X" in the field. I want to create a report returning fbompart, fbomdesc, fbommeas, and ftotqty. At the top I want the table name and serial no. Can anyone help me to get started. Thanks in advance

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,529
    Well, you would have to build the SQL of the query in VBA code, using a DAO QueryDef. The real question is why you have all the identical tables? This would be simple with a normalized table design.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    DuWayne is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    8

    Why so many tables

    The reason i have so many tables is that I have to pull the bom's out of an ERP program so I can look at all the components that make up our product.
    If you can help me find a better way, I'm listening
    Thanks for the reply
    Merry Christmas

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

Similar Threads

  1. Replies: 3
    Last Post: 11-18-2011, 03:53 PM
  2. Button to Create New Record
    By Pam Buckner in forum Access
    Replies: 3
    Last Post: 10-14-2011, 09:46 AM
  3. Replies: 1
    Last Post: 10-06-2011, 02:28 PM
  4. Create an RDP link button on my form
    By BDP in forum Access
    Replies: 1
    Last Post: 09-14-2010, 02:49 PM
  5. Create a command button to Browes for file
    By sawill in forum Programming
    Replies: 3
    Last Post: 03-15-2009, 05:02 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