hi.. i need some help here.. i'm currently trying to insert/update data from a form into a table.. if the record exists in the table, it'll update the data and if not, it'll insert new data into the table..
i have no problem with the queries, but my problem is that i cannot do a lookup whether the record is in the table..
this is the current lookup code i'm using.. tell me where i'm going wrong.. i need it to return the MbrID if its in the MailingAddress table, and null if its not.. the MbrID value is taken from the textbox in the form..
i have no problem with the queries, but my problem is that i cannot do a lookup whether the record is in the table..
this is the current lookup code i'm using.. tell me where i'm going wrong.. i need it to return the MbrID if its in the MailingAddress table, and null if its not.. the MbrID value is taken from the textbox in the form..
Code:
Dim varID As Variant
varID = DLookup("[MbrID]", "MailingAddress", "[MbrID] = Forms!Data Entry!ID_NoTxt")