Solved

WEIRD ERROR While updating an Access form recordset (prompts for old field)

Posted on 2012-04-03
7
339 Views
Last Modified: 2012-08-13
I have updated the name of a field in the table from which a form and its subform draw information. The recordsource property is empty at design, but is filled in through code. The thing is, there is one field on the table whose name I changed. I updated ALL the objects/forms/components to the new field name, and STILL, when it runs the code line where it feeds the recordsource property of the form, I get an inputbox asking me for the value of the old field that is no longer ANYWHERE in the form. Besides, the query I assign to the form is valid (verified), and it sure does not include that old field name. And the funny thing is, it does not happen every time; just about 80% of the times. It seems as if there is some kind of residue in a cache file or something... I don't understand. Also, I am running that database from a network.
I AM SO SICK OF ACCESS BUGS.... Version 14, and you'd think they would have taken care of this basic stuff....

Anyone has an idea? Thanks so much.
0
Comment
Question by:Hikarus
7 Comments
 

Author Comment

by:Hikarus
ID: 37800333
PS: I have tried copying all the objects to a new form, and the problem persists. I don't get it :(
0
 
LVL 61

Expert Comment

by:mbizup
ID: 37800397
Open the query that you use for the recordsource.

Right click the window in the query builder and select 'properties'

Are there any occurrences of this field in the property sheet - such as in the filter or order by properties?

Also try making a backup and compact/repairing.
0
 

Author Comment

by:Hikarus
ID: 37800408
No, there are no references to the old field AT ALL.
In design mode, the property is left empty.
I have already tried compacting/repairing.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 37800496
After making a backup and trying the compact and repair, try decompiling and recompiling the database.  I usually do this via a batch file on my desktop (do it once or twice a week for the app I'm working on at the time).

"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "C:\Users\xxx.yyy\Documents\Work\Access\myDb.accdb" /decompile

The stuff in the first set of quotes is the full path and filename where your version of Access resides (probably not Office12 from your post).  The second is the full path and filename of your database file.

Then recompile do another compact/repair operation and then recompile.

Finally, if that doesn't work, get a copy of Rick Fishers "Find & Replace" and run a search on the old Field name.  You may have it buried in a property (, sort order, order by) of a form, report or query, or in another query somewhere else in your database that is causing the problem.

Dale
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37801292
<I get an inputbox asking me for the value of the old field that is no longer ANYWHERE in the form.>
<No, there are no references to the old field AT ALL.>

It may be there somewhere, you may just not be able to locate it...
;-)
Sometimes references to the old field are lurking in comboboxes, or in your code.

How about just posting a example db that has this issue?

This way we are not just guessing at the solution...

JeffCoachman
0
 

Author Closing Comment

by:Hikarus
ID: 37801789
That Rick Fishers "Find & Replace" is a tool that Microsoft should have included in Access a looooong time ago!! AWESOME!! <br /><br />Thanks, Dale! :)
0
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 37801849
Glad I could help.

F&R is a great program.  I use it all the time, especially when I decide I want to change a field, table, or query name.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now