Results 1 to 2 of 2
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    VBA sql to edit specific information

    Would it possible to put criteria on an sql in vba?



    I require to change a checkbox but because the query is locked due to having more than one many to many junction in the record source I can't edit the details

    however if possible I would like vba to look up the record, then edit the details using vba

    I thought maybe if I can use sql in vba then I might be able to edit the details providing there is criteria to only edit that one.

    possible?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    Yes, VBA can execute SQL actions.

    CurrentDb.Execute "UPDATE table SET somefield=something WHERE afield=this"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 05-31-2013, 08:53 AM
  2. Add and edit Information in the same form?
    By sdel_nevo in forum Forms
    Replies: 3
    Last Post: 05-18-2013, 10:30 AM
  3. Save date-specific information for a record.
    By billef32 in forum Programming
    Replies: 2
    Last Post: 03-25-2013, 09:48 PM
  4. Replies: 1
    Last Post: 06-26-2012, 09:37 AM
  5. Replies: 1
    Last Post: 04-06-2009, 07:25 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