By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,968 Members | 1,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,968 IT Pros & Developers. It's quick & easy.

Help with If Then statement

P: n/a
Hi all,

I have an if then statement coded as an after update event procedure on
a data entry form. It works perfectly on an Access 2000 database, but
when I try the same query on an Access 2002 database I get a "variable
not found" message. I have verified that the field names are correct
but I still cannot get it to work.

The query is as follows:.

If [MaritalStatus] = "Married-Living Together" Then
[SpouseName] = IsNotNull
[SpouseName] = Null
End If

Is there something I am missing, or something that changed between the
two versions of Access?

Any help is greatly appreciated.


Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Hi Bonnie,

From what I understand about your problem, you have a data entry form,
and an After_Update event fires when you do something on the form. And
then you have a query in an Access 2000 mdb, and I assume you have the
same query in the Acces 2002 mdb. I can guarantee that something is
missing from the Access 2000 mdb in the Acc2002 mdb. The question is
what? For that we would need just a few more details about how your
After_Update event is being fired. Like, what control on your form is
firing this event? I will guess that it is a combobox field that is
based on some query. It sounds like you are entering data on a form
where you select the marriage status of a person from this combobox -
like "single" - then the spousename field in the data entry form
receives a Null value. If the value from the combobox is
"Married-Living Together" then the After_Update event fires after the
selection and an isnotnull flag is set. What is isnotnull? Is this a
boolean variable? If it is just a text expression, try putting double
(" ") quotations around it: "isnotnull".

*** Sent via Developersdex ***
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.