Results 1 to 4 of 4
  1. #1
    wptaylor4 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    9

    Tricky Multiple Append Project

    This one is long and detailed, but should be a fun challenge for those with more expertise than I.



    The synopsis is that I am trying to create VBA that will run 13 separate append queries each month. These queries will take information from a large table and append them to smaller tables according to a vendor number. As of right now I have a parameter that allows me to insert a 4 digit YYMM number (such as 1305 for May 2013) that will let me update the files. These queries all work and will append correctly.

    The problem I ran into is that the VBA (as currently constructed), prompts me to input the YYMM for each query (defeating the purpose of the VBA, which is so that I can enter the date once, and walk away).

    My solution was to create a form in which I could enter my 4 digit YYMM once and have all of my append queries to run off of that, allowing my VBA to run all of the queries without the prompts.

    Thusfar I have not been able to circumvent the prompt issue and I am wondering if there is anybody here who can get the form to fill in the YYMM without the prompts.

  2. #2
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    2 questions: 1. What version of Access are you running? 2. In each of the queries how do you have the parameter set?

  3. #3
    wptaylor4 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2013
    Posts
    9
    I am running Access 2007 and I had the query parameters originally set as [what period?] to bring up a prompt to enter the YYMM (which worked). Now they are set as [Forms]![PeriodUpdate]![txtUpdateOnhand]. My form is called Period update and my box is called txtUpdateOnhand. When I click on the append query now, I get a prompt that says "Forms!PeriodUpdate!txtUpdateOnhand" which I thought should have been solved by the form in the first place

  4. #4
    wptaylor4 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2013
    Posts
    9
    Allow me to update the situation. The append queries are running off of a system of other queries that are designed to manipulate the information (again they work with the period prompt). I am starting to narrow down the code for the

    Code:
    Private Sub txtUpdateOnhand_Click()
    CurrentDb.Execute "ConsignedVendor1OnhandUpdate", dbFailOnError
    CurrentDb.Execute "ConsignedVendor2OnhandUpdate", dbFailOnError
    'etc for the 13 queries
    End Sub
    though I am getting an error on that (3061, which I can debug). I am still just super confused on the use of the textbox to enter my YYMM. It doesn't seem to want to work

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

Similar Threads

  1. Replies: 3
    Last Post: 07-11-2013, 02:48 AM
  2. Replies: 6
    Last Post: 07-02-2013, 11:28 AM
  3. Append to multiple tables
    By GraemeG in forum Queries
    Replies: 1
    Last Post: 04-05-2012, 11:42 AM
  4. Replies: 22
    Last Post: 01-25-2011, 11:19 AM
  5. Replies: 1
    Last Post: 04-01-2010, 05:40 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