B
Bill
Hi,
I'm not sure if I am doing right thing. I am still learning how to use
"DLookup".
I have two tables that are similar but Country might be different.
For example:
#1) If I enter record number and if Table A and Table B are the same then
no message box pop up. OR
#2) If I enter record number and if Table A and Table B have different
country then the message box pop up and advise me what country at Table B.
***********************
varRecordNumber = DLookup("[MyField_A]", ("MyTable_A"), "[MyField_A] = '" &
varNumber & "'")
varCountryNotMatch = DLookup("[MyField_B]", ("MyTable_B"), "[MyField_B] <>
'" & varCountry & "'")
If IsNull(varCountryNotMatch) Then
'MsgBox "............", vbOKOnly, "......"
************************
Your help would be much appreciated.
Thanks
I'm not sure if I am doing right thing. I am still learning how to use
"DLookup".
I have two tables that are similar but Country might be different.
For example:
#1) If I enter record number and if Table A and Table B are the same then
no message box pop up. OR
#2) If I enter record number and if Table A and Table B have different
country then the message box pop up and advise me what country at Table B.
***********************
varRecordNumber = DLookup("[MyField_A]", ("MyTable_A"), "[MyField_A] = '" &
varNumber & "'")
varCountryNotMatch = DLookup("[MyField_B]", ("MyTable_B"), "[MyField_B] <>
'" & varCountry & "'")
If IsNull(varCountryNotMatch) Then
'MsgBox "............", vbOKOnly, "......"
************************
Your help would be much appreciated.
Thanks