append queries in VBA

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • twiggymoo
    New Member
    • Mar 2008
    • 4

    append queries in VBA

    Hello All,
    I have several append queries that populate the same table from different tables which I run several times per week.
    Right now I do them through the query setup wizard but I want to automate them using VBA Script.
    How can I do this??
    Each time I run them, the destination table is/should always be empty before I begin.

    Thanks!!!
    Twiggymoo
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by twiggymoo
    Hello All,
    I have several append queries that populate the same table from different tables which I run several times per week.
    Right now I do them through the query setup wizard but I want to automate them using VBA Script.
    How can I do this??
    Each time I run them, the destination table is/should always be empty before I begin.

    Thanks!!!
    Twiggymoo
    [CODE=vb]
    DoCmd.SetWarnin gs False
    DoCmd.RunSQL "Delete * From <Destination Table>;"
    DoCmd.RunSQL "<Append Query SQL to populate Destination Table>;"
    DoCmd.SetWarnin gs[/CODE]

    Comment

    Working...