Control Can't be edited; It's bound to autonumber field 'ID'

I am getting the error message "Control Can't be edited; It's bound to autonumber field 'ID'" when trying to bring up data through a subform.   Expert will need to download my database, pick 'Campbell' as the instructor, and then try to select a student from the dropdown list to replicate error.

Link to database will be in comment below.

LVL 4
dovcampAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dovcampAuthor Commented:
0
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
An Autonumber field type automatically assigns values when a record is inserted, and users/developers cannot edit the value.

Downloading your file will not be necessary to answer your question.

0
dovcampAuthor Commented:
I understand that part, but I need help figuring out how to tie the sub-form to the form properly.
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
What are the common keys of your form and subform RecordSource?
(In design view, click on each and do right-click:Properties, data tab, first parameter)

Then, go to the Properties of your subform, and enter those common keys in the Link Child Fiels and Link Master Fields properties.

Then, since an AutoNumber field is not editable, make sure that your ID in both your form and subform is either set to Enabled=No or Visible=No, so it can't be edited.
0
dovcampAuthor Commented:
Where do I find the "Link Child Fields" & "Link Master Fields" properties?  I don't see them in the main properties of my sub-form
0
stevbeCommented:
use the StudentID instead of ID from Contacts on the subform.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stevbeCommented:
and you need to use the StudentID from Students and Classes instead of the one in Contacts.

this should be the SQL for the record source of your subform.
SELECT [Students And Classes].Grade, [Students And Classes].ClassID, [Students And Classes].StudentID, Contacts.Status
FROM Contacts INNER JOIN [Students And Classes] ON Contacts.ID = [Students And Classes].StudentID;
0
dovcampAuthor Commented:
steveb, when I do that I get a message saying "field cannot be updated"
0
stevbeCommented:
and you really should repair/compact befor zipping, it reduced the file size from 1.94 meg to 426K ... much easier on us :-)
0
stevbeCommented:
<steveb, when I do that I get a message saying "field cannot be updated">
yes ... sorry about posting before fully tested ... please incorporate my second post which ... I did test :-)
0
dovcampAuthor Commented:
stevebe,

That did it.  The confusion was that I had a field in the Contact table called 'StudentID' that was different than the 'StudentID' field in the Student and Classes table.  Thanks for straightening me out, and I went ahead and renamed the StudentID field in the Contact table to StudentNumber.  

I will be sure to compact and repair the database next time ;)

This one really had me stumped.  Your help is greatly appreciated.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.