To make changes to this field, first save the record. (1 Viewer)

xPaul

Registered User.
Local time
Yesterday, 21:28
Joined
Jan 27, 2013
Messages
65
All,

Say I have three tables:

tblHouses
HouseID - PK/AutoNumber
HouseName
TownID - FK

tblTowns
TownID - PK/AutoNumber
CountyID - FK
TownName

tblCounties
CountyID - PK/AutoNumber
CountyName

I create a query from this:
HouseID (tblHouses), HouseName (tblHouses), TownID (tblHouses), TownName (tblTowns), CountyID (tblTowns), CountyName (tblCounties)

A form is then created from this query.

Then I change the CountyID of an existing record and then go to change the TownID of the same record (not saving in between) in the query why am I being greeted with the message in the status bar 'To make changes to this field, first save the record' when I can change the CountyID in the form and the TownID of the same CountyID record in the table tblHouses without issue?

What am I trying to achieve? Basically I want to allow the user to select a town and county for a house. Or when noticing a county is wrong for a town that when changing the county it will update all other records with the same town listed.

Where does the problem arise in the form? Say in the scenario whereby the county is accidentally changed but is then changed back to the original value but it was the town that was meant to be changed. Access at this point will not allow the value for the TownID field to be changed prompting with the message 'To make changes to this field, first save the record'.

How can I handle this? I have thought of setting the county control back to the old value however the record is still in a changed state and prompts the status bar message. I could run the me.undo command (which works) but I don't want to undo the whole form if there are other changes made to the form, say the house name has been changed.

Is there a way of dealing with this? I don't particularly want to be disabling the town control if any changes are made to the county control and only enabling the town control once the full form is saved or changes undone.

Looking forward to your responses!
 

CJ_London

Super Moderator
Staff member
Local time
Today, 05:28
Joined
Feb 19, 2013
Messages
16,610
Then I change the CountyID of an existing record and then go to change the TownID of the same record (not saving in between)
without seeing the sql to your query, a guess would be that your query has too many tables to make changes. The rule is one table one, form. Use subforms and the linkchild/linkmaster properties to represent the join.

Also use combo/listboxes
 

Users who are viewing this thread

Top Bottom