VBA on form doesn't recognize field names

U

ucdcrush

I'm stumped. I have a simple form linked to a simple table. I am
writing IF statements in the VBA form_current part, and successfully
wrote 48 of the 50 necessary. Two of them (inbetween the others, i.e.
not the last 2) are not working as VBA does not recognize two field
names.

The names are:
sevDocBefore
and
sevLevelBefore

and are numeric variables. They are in the form controlled by option
groups. The strange thing is, there are a bunch of similar items on the
form that work fine.

I notice that in VBA, the 48 that worked, it would automatically change
the capalization of the field name to match the field name in the
table, e.g. if I type

If isnull(qrmeds), VBA would change to

if Isnull(qrMeds)

which tells me that it is recognizing it. However, it is not
recognizing the two I listed above. Also when I made a simple command
button on the form, then under the _click property said:

msgbox sevdocbefore

VBA still does not recognize it, and when I click on the button in the
form it just shows a blank box with an OK button. On the form I have a
text box I've linked to sevDocBefore and I can see the value change
from 0 to 1 as I click the buttons in the option box connected to
sevDocBefore. Still the msgbox pops up a blank.

there is no object on the FORM named sevdocbefore (e.g. the option
boxes are all just option333, option 341, etc).

Anyone have any ideas what the solution could be? to my eyes, these 2
variables are nearly identical to others where everything is working
fine. I have tried compact and repair, but it makes no difference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top