Ask Experts Questions for FREE Help !
Ask
    rakshu4ever's Avatar
    rakshu4ever Posts: 1, Reputation: 1
    New Member
     
    #1

    Dec 4, 2006, 03:37 AM
    Visual Basic
    hi, I am using Access as my DB. I want to save a value in one table in DB. But the value am saving shd exists in database in another table. i.e. that value hs to be compared with the other table .Only if it exists then it has to be saved. How to do it.
    gillskad's Avatar
    gillskad Posts: 13, Reputation: 1
    New Member
     
    #2

    Dec 22, 2006, 10:28 AM
    Quote Originally Posted by rakshu4ever
    hi, I am using Access as my DB. I want to save a value in one table in DB. But the value am saving shd exists in database in another table. ie that value hs to be compared with the other table .Only if it exists then it has to be saved. How to do it.
    What kind of table you are making. And how you are relating them with each other.
    admiralsfan's Avatar
    admiralsfan Posts: 23, Reputation: 3
    New Member
     
    #3

    Jan 9, 2007, 10:04 PM
    Quote Originally Posted by rakshu4ever
    hi, I am using Access as my DB. I want to save a value in one table in DB. But the value am saving shd exists in database in another table. ie that value hs to be compared with the other table .Only if it exists then it has to be saved. How to do it.
    Sounds like a JOIN with a same primary key or foreign key in both tables
    GaryStaunton's Avatar
    GaryStaunton Posts: 17, Reputation: 2
    New Member
     
    #4

    Jan 20, 2011, 10:35 PM
    Wouldn't you need to search the second table for the value, if it exists, then save it to the first table?

    Eg query:

    SELECT * FROM TableValues WHERE FieldName = 'FindThisValue'

    So...

    Data1.RecordSource = strQRY

    If Data1.Recordset.RecordCount = 0 Then

    '// Doesn't exist so don't save it

    Else

    '// It exists in the values table, so we can now save it

    End If

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Visual basic [ 1 Answers ]

Where do I go on my computer to find out what version of visual basic I have? Thanks

Visual basic [ 1 Answers ]

I am doing visual basic program. Could you help with the code how to login.

Visual Basic 6.0 [ 1 Answers ]

What is the cost of Visual Studio 6.0 Enterprise Edition?

Visual basic [ 1 Answers ]

How can I disable maximise button of a form but minimise and close button should be enable?

Visual Basic [ 1 Answers ]

I want to add icon in the button which I have used in my visual basic program. How can I do that. Please help.


View more questions Search