Results 1 to 4 of 4
  1. #1
    3 Star Lounger MacroAlan's Avatar
    Join Date
    Feb 2003
    Location
    St Louis, Missouri, USA
    Posts
    254
    Thanks
    6
    Thanked 1 Time in 1 Post

    Append and/or Update (VBA/Access/XP)

    I have a number of files that I will be bringing over from Excel on a regular basis. Can I write a macro that if a Update fails because the data is not already there to Append instead?

    While I have years of Excel VBA experience, Access is kind of new to me.
    Alan

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Append and/or Update (VBA/Access/XP)

    Access VBA is somewhat different than Excel, but many of the same constructs exist, so spend a little time understanding the object model used in Access, and then you should be able to use VBA to do what you want to do - but not Access macros. The are pretty limited in what they can do, and they have no error trapping capability.
    Wendell

  3. #3
    3 Star Lounger MacroAlan's Avatar
    Join Date
    Feb 2003
    Location
    St Louis, Missouri, USA
    Posts
    254
    Thanks
    6
    Thanked 1 Time in 1 Post

    Re: Append and/or Update (VBA/Access/XP)

    I meant that I want to do it in Access VBA (problem with terminology). Does Access VBA have error trapping capability?
    Alan

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Append and/or Update (VBA/Access/XP)

    Yes, you can use the standard VB/VBA error trapping methods: On Error GoTo ..., Resume ..., Resume Next etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •