Results 1 to 2 of 2
  1. #1
    Steven.Allman is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2010
    Posts
    118

    IF condition in a Macro on my form

    I currently have a database that also copies some data to a sharepoint list for use by other agencies within my organization.
    This is done upon updating a form which obviously saves the data to my table, then I have to manually hit buttons with macros that will - save record - run an updatequery to make changes to the identical record in the mirrored Sharepoint list - or run an append query to write a new record in the sharepoint..
    I would like to make this a single button, OR even better, tie it to an AfterUpdate. My question is how would I code the macro to run the updateQuery IF record exists, and if it doesnt, then run the append? Is there an easier way? I think the UpdateQuery would obviously fail if the record doesnt exsist, so would that stop a single macro, or is there an IfError I can do in the middle of a Macro?

  2. #2
    Steven.Allman is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2010
    Posts
    118
    I should mention that I currently have this AfterUpdate working, but would like to suppress the 30 , are you sure, really really sure messages, and the error messages if the record DOES already exsist.

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

Similar Threads

  1. Replies: 7
    Last Post: 07-12-2013, 01:49 PM
  2. Using Condition in Stop Macro
    By MikeWaring in forum Programming
    Replies: 2
    Last Post: 11-01-2012, 03:00 PM
  3. Type mismatch in condition embedded macro
    By geremore in forum Programming
    Replies: 3
    Last Post: 08-09-2011, 02:05 PM
  4. where condition within a macro
    By kstyles in forum Reports
    Replies: 3
    Last Post: 04-08-2011, 03:58 PM
  5. Macro Condition
    By eww in forum Programming
    Replies: 5
    Last Post: 08-27-2010, 10:59 AM

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