Solved

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

Posted on 2012-04-03
7
349 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 48

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 48

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

690 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