dcsimg
Results 1 to 5 of 5
  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2009
    Posts
    175

    How to check if a record exist in a MS Access DB using Query Builder

    Hi,
    is their a way to check if a record exists in an MS Access database using the query builder?

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    99,144

    Re: How to check if a record exist in a MS Access DB using Query Builder

    The query builder is for building queries. Is there a query that can determine whether a record exists? Of course there is. Think it through. If you execute a query that retrieves records that match specific criteria and there are no matching records, what do you think would happen?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2009
    Posts
    175

    Re: How to check if a record exist in a MS Access DB using Query Builder

    Thanks for replying,
    can you provide an example of the explanation?

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    99,144

    Re: How to check if a record exist in a MS Access DB using Query Builder

    It's a simple query with a WHERE clause. If you don't understand how to write a query with a WHERE clause then you should learn. Asking for an example here and an example there for specific cases is a waste of everyone's time; yours included. You should learn the basics of SQL at least - a WHERE is clause is very much part of the basics - and then you can handle lots of different situations and only have to ask about the more complex things. I suggest that you follow the SQL tutorial link in my signature below to learn the basics of writing SQL. Note that you might also write the query to return a count of matching records and then a result of zero means no matches and anything else means there are matches.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    6,805

    Re: How to check if a record exist in a MS Access DB using Query Builder

    Ultimately you're going to produce a SQL Query and, while the query builder might be tempting to use at first, it's really quite restrictive and you're better just learning a bit of SQL Syntax for this.

    JMcIlhinney has a Beginner Tutorial: SQL link in his signature, check that out. Everything you need to write a Select Where Query (which is everything you need to check for the existence of a record) is covered by the first few lessons.
    You can depend upon the Americans to do the right thing. But only after they have exhausted every other possibility - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width