Check whether records exist in Access table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elbatz
    New Member
    • Dec 2007
    • 14

    Check whether records exist in Access table

    Can somebody help me? How do I know if records in Table1 are also in Table2, using VB6 code?

    For example:

    If Table1 has 1111 in column1 and also Table2 has 1111 in column2
    msgox "Existing record in Table2"
    else
    msgbox "No record in Table2"
    Last edited by Killer42; Dec 28 '07, 06:08 AM.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    you need to pass the value of table1 and check the same in table2 using COUNT().

    if count returns more than 0 then the data exists else does not exist.

    Comment

    Working...