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

Wierd Stuff that happens. Access Reference Refresh.

P: n/a
I know that somethimes when I make changes to the tables (like adding
new fields), these changes do not always appear in the field list. If
I remove the table name from the forms record source, run my code, and
then replace the table name in the forms record source it finally
appears. I found this soultion in the news group.

This time, I changed the name of a textbox from txtMyBox to txtMYBOX.
However, when I type in Me.txtMYBOX, the editor changes it back to the
old Me.txtMyBox. Apparently Access has failed to refreshed this
reference. What is the Trick for this one???

Thanks
Greg

Mar 18 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a

Sometimes this works, but when all you change is the upper/lower case
it sometimes stays one way unless the control is deleted. Change the
name to something different, eg. txtMYBOX2, save the form/report,
close it, open it again in design and change the name back to the
desired format, save and see if it sticks. Ultimately the name is the
same so the compiler dosen't care what case it's in.

Mar 19 '07 #2

P: n/a
Try this sequence (in order):

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
In Access 2007, it's:
Office Button | Access Options | Current Database | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Change the Name property of the text box (not merely its Control Source.)

3. Compact the database:
Tools | Database Utilities | Compact/Repair
or in Access 2007:
Office Button | Manage | Compact/Repair

4. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

5. Open Access (holding down the Shift key if you have any startup code),
and compact again.

Unless you have something else with that name somewhere in the code, that
should work. A global search'n'replace in the code window might fix the case
if it does occur elsewhere.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<Ap******@gmail.comwrote in message
news:11**********************@p15g2000hsd.googlegr oups.com...
>I know that somethimes when I make changes to the tables (like adding
new fields), these changes do not always appear in the field list. If
I remove the table name from the forms record source, run my code, and
then replace the table name in the forms record source it finally
appears. I found this soultion in the news group.

This time, I changed the name of a textbox from txtMyBox to txtMYBOX.
However, when I type in Me.txtMYBOX, the editor changes it back to the
old Me.txtMyBox. Apparently Access has failed to refreshed this
reference. What is the Trick for this one???

Thanks
Greg
Mar 19 '07 #3

P: n/a
Thanks Mike and Allen

I figured I would try Mike's suggestion first, because it was quick
and easy.
Good News - It Worked.

I will keeps Allen's suggestion for the future dilemma that will not
yield.

Thanks Guys

Mar 19 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.