"property is read-only and can't be set"

Valerie

Registered User.
Local time
Today, 23:52
Joined
May 7, 2003
Messages
65
I've created a Main form and subform, and everytime I try to enter anything in the subform (in any field) I get the message "property is read-only and can't be set".

Clicking OK to the message clears it and I can then continue to enter the data successfully into the rest of the record.

I have tried the following
- Removing the primary keys from the table
- adding suitable relationships
- removing the relationships
- recreating the form / subform
- renaming the fields on the subform
- renaming the forms

I've now run out of ideas.

Any suggestions would be welcomed.

Valerie
 
Valerie,

I'd guess that there is some code running in the form's OnCurrent event.

Is there any code on the subform?

Wayne
 
No - there is no code at all in either the Main form or sub form.

In fact I have just created a new test db to try to fix this - I have imported the relevant tables and recreated the forms from scratch. Am now getting the error "You can't refer to a form or report module from form view or Report view if the form's or reports HasModule property is set to No. Switch to design view or set the HasModule property to Yes in order to refer to the module".

This is very confusing! especially as there is no code and I am not trying to do any clever here

Any other ideas?
 
Valerie,

With those errors there has to be some code. Can you post a sample?
You don't need to post data, just the form.

Tools --> Database Utilities --> Compact/Repair
Then ZIP
Then attach.

Wayne
 
Thanks for helping.

I have definately not got any code on the main form or subform.

I have attached the zipped database - if you open the form MarkingGrid and then try typing any letter into the Tutor box you will see the error message. Ideally the tutor box should be a combo box but I changed it to a text box in case that was causing the error.

I look forward to you comments / suggestions.

Valerie
 

Attachments

Valerie,

"Module" is a word reserved for use by Access. Change it to something else
and it'll be OK.

Wayne
 
Fantastic Wayne - thanks for sorting that out.

Only problem is - this is just an extra form to be added on to an existing database and I have been using the field "Module" for ages - not to worry that is something that I know that I can fix.

Once again - thank you very much.
 
Thanks for the article re reserved words.

This database was originally developed in 1997 using Access 97 - obviously before Module was a reserve word.

Thanks Again for you help
 
Technically, no. "Module" was a reserved word back then. But Ac97 was a lot dumber, too.
 

Users who are viewing this thread

Back
Top Bottom