Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    You're welcome
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  2. #17
    DevState is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2018
    Posts
    35
    I'm back, lol. I put the following in my code:
    Code:
    DoCmd.RunSQL ("Termination_strip")
    and it bounces back with an Run-time error "3129"
    Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'
    Any idea why? The query runs if I run it alone.

  3. #18
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,979
    As the error says, DoCmd.RunSql is used with SQL statements for action queries such as UPDATE
    It can't be used with SELECT statements

    If termination_strip is a query then use
    DoCmd.OpenQuery "termination_strip"
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  4. #19
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    ("Termination_strip") is not SQL is a query name.

    Do this:

    Code:
    DoCmd.OpenQuery "Termination_strip"

  5. #20
    DevState is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2018
    Posts
    35
    Newbie mistake and it works.

    Is there a way, out of curiosity, to have my Update query show me what exact records were modified? Like pull the First name and display it in a table?

  6. #21
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    you could use an append query with the same criteria. It can be usefull for tracking changes/showing previous values. You would have to make a table specifically for this though.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 08-01-2017, 01:14 PM
  2. Replies: 3
    Last Post: 11-03-2015, 11:19 PM
  3. to split or not to split my db?
    By RLehrbass in forum Access
    Replies: 6
    Last Post: 09-17-2015, 01:54 PM
  4. Get split form behaviours without using a split form
    By SyntaxSocialist in forum Queries
    Replies: 2
    Last Post: 04-12-2013, 11:56 AM
  5. When to split
    By Mclaren in forum Database Design
    Replies: 4
    Last Post: 07-07-2010, 07:25 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