Results 1 to 3 of 3
  1. #1
    axess_nab is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    May 2010
    Posts
    30

    Unhappy Testing if a record exists on a Table

    Hi guys, once again bothering you... I'm not sure if I'm doing things harder than they should but well here I am. This time I'm trying to verify if a Payment Order was generated for an Invoice of a Credit Supplier. Some times working in the office we can forget to make the payement order for a supplier after we received the material.

    I was originally planing first doing a query of the Invoices Table and using the "payment method" to get all the "Credit" Invoices.

    The next part should be checking if for every Invoice with this payment method we have issued a payment order. I plan checking this on the "Payment Order" table checking if the Invoice number exists and if it doesnt I should be able to display them.

    This part is where I'm stuck... I thought I could use subform in table view to show the Invoice numbers that are missing the payment order. I was trying to use a single query (the one that shows all the Credit Invoices) to check this. The test I guess should be performed with a combination of the IIF and the Dlookup functions but I don't know If I can put this on a criteria of the query to be sure it tests every invoice....



    Damn I just read everything above and I'm not sure if I'm explaining myself I hope after you read what I intend to do someone can at least guide me through this :S thanks guys I'll be trying to understand what I'm reading about this functions and trying to see how they work on the criteria of the query.

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    in answering the question on the label of your post; look at the DCount method to get the syntax...

    then one can do a compare i.e. If DCount(your syntax here)>=1 then

    Hope it helps.

  3. #3
    axess_nab is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    May 2010
    Posts
    30
    NTC thanks for the reply however I didn't get to use it .... It's amazing how a walk and some air can help. I came back and I tried to create the query again through the query wizzard and I read something like "non coincident search" at the bottom of the options.. The rest well my sorry ass is still regreting haven't read that for the last 2 days... I will read more about the DCount function and see if It may be used in other parts of my db. Thanks a lot

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

Similar Threads

  1. How to test of record exists in table?
    By tdaccess in forum Access
    Replies: 3
    Last Post: 04-13-2011, 10:22 AM
  2. if record exists...conditional query criteria
    By mbryanr in forum Queries
    Replies: 2
    Last Post: 02-12-2010, 11:50 AM
  3. SQL - find out whether a table exists
    By yurako in forum Programming
    Replies: 2
    Last Post: 01-20-2010, 09:27 AM
  4. Replies: 1
    Last Post: 11-30-2009, 05:05 AM
  5. Create Table If Not Exists
    By jp2access in forum Queries
    Replies: 7
    Last Post: 07-14-2009, 12:49 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