Access VBA field/variable issue

Associate
Joined
25 Feb 2016
Posts
219
I created a table and associated form in access and started doing some vba coding.

In one of the fields I accidently capitalised an extra letter, for instance::

FirstName
MiddleName
SEcondName

In the table I have fixed SEcondName to SecondName, but no matter what I do, when I type it into the vba editor, it alters it to show as SEcondName.

I have deleted the entry from table, form and VBA and compacted/repaired database and then put it back as SecondName, but for some reason vba editor still capitalises the first 2 letters. It shows in table correctly and add fields in the form but the vba editor just wont let go.

How do I fix this as it's driving me nuts?

EDIT: Ok after much larking about it is now working. That was a productive 30 minutes.

EDIT: Ok I've spotted another one. Darn my clumsy fingers. Anyone know a quick wat to fix it?
 
Last edited:
Are you using Option Explicit at the top of the modules? This helps you find errors at runtime.

Not sure I seen this before, but what happens with your intellisence if you start typing the same code on a new line?

I've put option explicit. It had option compare database. I have to say I don't know either means.

LE1.jpg

LE2.jpg

LE3.jpg
 
The variable is a field in a table and inserted into a form. I added the extra capital when setting up the table. It is present in 3 tables and used on 3 forms, but these are not linked.

I deleted it from all tables. It is not DIM/declared anywhere in the entire project. I deleted every reference to it in the code yet it still it corrects to the extra capital when I type it. I set a global variable in a module. It's fine until I close and open the database when the variable in the module has been updated to the wrong one.

There must be a reference to it somewhere that I'm need to get rid of change but I can't figure out where. I manged to fix the one above but this one is proving tricky.
 
Last edited:
Back
Top Bottom