Access wants an entry for a nonexistent field (1 Viewer)

hilian

Episodic User
Local time
Today, 04:38
Joined
May 17, 2012
Messages
130
I made one modification to my db. I removed a text box, txt4_mh_10, from a subform, frmMH. I also removed the control source in the table, tblMH, 4_mh_10. There was also a line of code that changed the visible property for the text box depending on the answer to a previous control, and I removed that. Now, when I try to load the subform, I get the message “Enter parameter tblMH.4_mh_10.” I checked, and the field is gone, as is the text box and the line of code that references it.

Any idea how to fix this?

Thanks,

Henry
 

MarkK

bit cruncher
Local time
Today, 04:38
Joined
Mar 17, 2004
Messages
8,187
Check the row sources of combos or listboxes, which might still reference the deleted field. Also check the LinkMasterFields and LinkChildFields properties of any subform controls.
 

Galaxiom

Super Moderator
Staff member
Local time
Today, 21:38
Joined
Jan 20, 2009
Messages
12,859
Also check the Filter and Sort Properties of the Form. They stick if the form is saved with them implemented.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:38
Joined
Feb 28, 2001
Messages
27,337
For that matter, the recordsource for the (sub-)form, if it was created by a wizard, might have an explicit SQL query stored in the Form.Recordsource property rather than the name of a query. If the form had used an external query as-is, this wouldn't be the case, but the wizards WILL store SQL sometimes.
 

hilian

Episodic User
Local time
Today, 04:38
Joined
May 17, 2012
Messages
130
It does have an explicit SQL query stored in the record source property. I deleted tblMH.4_mh_10 from the query. Now it wants an entry for tblMH.ID.

Is it better to delete and reconstruct the subform. It only has 11 controls, or can I substitute the SQL statement with the actual table name?
 
Last edited:

Galaxiom

Super Moderator
Staff member
Local time
Today, 21:38
Joined
Jan 20, 2009
Messages
12,859
Now it wants an entry for tblMH.ID.

Check for the circumstance described in post 21 of this thread.


Is it better to delete and reconstruct the subform. It only has 11 controls, or can I substitute the SQL statement with the actual table name?

Should not be necessary to rebuild the form. Just find the reference if it isn't what I mentioned above.

BTW A useful tool for finding references to things anywhere in the project is V-tools Total Deep Search. Overkill in this case but something every developer should have.
 

hilian

Episodic User
Local time
Today, 04:38
Joined
May 17, 2012
Messages
130
Thanks to everybody who replied. I checked the row sources, as MarKK suggested. Nothing! Then I replaced the SQL statement with the name of the table. Now the form loads and seems to be working as intended. I will still look at the thread Glaxiom supplied the link for.

Cheers,

Henry
 

Users who are viewing this thread

Top Bottom