Results 1 to 2 of 2
  1. #1
    allstar45 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    35

    Which is better? checking in VBA or SQL

    I currently have a VBA statment that runs SQL to append to a table.

    I want to first check if there is already a record with the same name in the table to avoid duplicate entrys.

    Is it best to check before the query is run in the VBA, or in the SQL statment it's self to avoid this problem better?

    I'm not sure how I even would check the table with SQL.




    Thanks in advance!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    I would tend to check in VBA before running the SQL. You can use DCount or a recordset.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Automaticaly checking a check box
    By brandonze in forum Forms
    Replies: 9
    Last Post: 07-07-2011, 08:58 AM
  2. Automatically checking a box?
    By Delta223 in forum Access
    Replies: 3
    Last Post: 01-10-2011, 10:37 PM
  3. Checking a table for changes
    By Rando in forum Queries
    Replies: 2
    Last Post: 10-07-2010, 09:25 AM
  4. Checking for Value in Query
    By jgelpi in forum Access
    Replies: 1
    Last Post: 06-24-2009, 04:57 PM
  5. Need help checking database design
    By abc7 in forum Database Design
    Replies: 1
    Last Post: 10-29-2007, 08:08 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