Results 1 to 4 of 4
  1. #1
    pbDudley is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Mar 2017
    Location
    New Orleans
    Posts
    46

    A series of append queries where user has to enter the same number for each to run

    Click image for larger version. 

Name:	Enter_Plan_Repeated.jpg 
Views:	10 
Size:	25.3 KB 
ID:	49845Hello
    I have a series of append queries that I created a macro for, then I convert this to VB.
    So I have a series of append queries written as:

    DoCmd.OpenQuery "Qry_Append1" , acViewNormal, acEdit
    DoCmd.OpenQuery "Qry_Append2" , acViewNormal, acEdit
    DoCmd.OpenQuery "Qry_Append3" , acViewNormal, acEdit
    DoCmd.OpenQuery "Qry_Append4" , acViewNormal, acEdit

    This works fine with VB, but it prompts the user each time to enter the unique record, plan number, for each of the 4 append queries


    It also gives the: You are about to run an append query to ...
    Isnt there a way to enter this plan ID once and to turn off the: about to run an append query menus?

    Im not the best programmer, I just got the forms and queries to work properly, technically it works as is but Im certain there is a way to do this

    Thank you
    Last edited by pbDudley; 03-08-2023 at 10:43 AM. Reason: Add a image

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Have queries reference a textbox or combobox on form for user input.

    Exactly what does the Enter Plan Number button do?

    DoCmd.SetWarnings False
    'run queries
    ...
    DoCmd.SetWarnings True
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    IMHO if you turn off warnings your procedure should include an error handler that turns them back on. That, or use .Execute method of the database object.
    When I see multiple objects with similar names I suspect they are just minor variations of the same thing. If they are, one object used in several ways helps keep db size down and reduce re-design work when changes are made.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    pbDudley is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Mar 2017
    Location
    New Orleans
    Posts
    46
    The enter plan button opens a form that all of the append data will be on with additional data that has to be manually entered after the append queries are run

    Ill try the text box method with the set warnings line

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

Similar Threads

  1. Replies: 7
    Last Post: 09-09-2021, 10:36 AM
  2. Series number always starts at 1
    By trident in forum Reports
    Replies: 0
    Last Post: 04-14-2016, 02:18 AM
  3. Replies: 12
    Last Post: 10-14-2015, 01:00 PM
  4. Newbie to Access. Help with a series of queries.
    By mdmcguire in forum Queries
    Replies: 5
    Last Post: 10-17-2013, 12:14 PM
  5. Replies: 5
    Last Post: 05-08-2012, 01:26 PM

Tags for this Thread

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