G
Guest
This is going to be a lengthy explaination, but without it I will get
questions as to "why" it is being done this way; so forgive me in advance
I have a lookup form that list all the members enrolled with our company.
This list comes from the corporate office as a text file and is uploaded to a
sql backend. We can not get a live link! It contains strictly the member
demographics.
The first forms record source is simply a table that is created from the
download from the corp. office. The user looks up the member in this form
and then click a button to copy the member demograhics to the second form.
The second form has a different table as a record source (it contains more
information then just demographics). And not every member with the company
will require a record to be created in this database.
The code to copy the member demographics from the first form to the second
form works great until I try to add a DCount function to check and see if the
member exist in the second form table source prior to copying the information
over. The only field that needs to be checked for existance is the MemberID
field.
I just want to take the MemberID field from the first form (MemberLkp) and
check it against tblMemberInfo and if it exist I just want a msg box telling
the user that the record already exist and then exit the function, otherwise
if the member hasn't been created yet in the tblMemberInfo then continue on
with the copy function.
I have tried several variations of the DCount function and apparently am
just not getting the syntax right. I have tried setting a break point at the
beginning of the IF statement and it never breaks, so I can't even step
through it and see what I am doing wrong <arrrrrgh> ........ someone please
help --- what am I doing wrong.
Thank you so much!
Charlie
questions as to "why" it is being done this way; so forgive me in advance
I have a lookup form that list all the members enrolled with our company.
This list comes from the corporate office as a text file and is uploaded to a
sql backend. We can not get a live link! It contains strictly the member
demographics.
The first forms record source is simply a table that is created from the
download from the corp. office. The user looks up the member in this form
and then click a button to copy the member demograhics to the second form.
The second form has a different table as a record source (it contains more
information then just demographics). And not every member with the company
will require a record to be created in this database.
The code to copy the member demographics from the first form to the second
form works great until I try to add a DCount function to check and see if the
member exist in the second form table source prior to copying the information
over. The only field that needs to be checked for existance is the MemberID
field.
I just want to take the MemberID field from the first form (MemberLkp) and
check it against tblMemberInfo and if it exist I just want a msg box telling
the user that the record already exist and then exit the function, otherwise
if the member hasn't been created yet in the tblMemberInfo then continue on
with the copy function.
I have tried several variations of the DCount function and apparently am
just not getting the syntax right. I have tried setting a break point at the
beginning of the IF statement and it never breaks, so I can't even step
through it and see what I am doing wrong <arrrrrgh> ........ someone please
help --- what am I doing wrong.
Thank you so much!
Charlie