add record in subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform to keep track of mulitple performance reports due on an
individual, and I have them link with a field "name" the child and master
both say "name", but everytime I try to add a new report it tells me that it
is read only, and I can't enter anything! In the name field I can manually
put in the same name as the master, and then it works. How do I get it to
automatically fill in the "name" in the subform that is in the master form,
and get it to allow me to add a report?
 
Rename the field. Almost everything in Access--forms, text boxes, ...--has a
Name property, so Access is confused and trying to use the Name of the form
instead of the field called name. Naturally, the name of the form is
read-only while using the form.

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of the Name AutoCorrect junk:
Tools | Database Utilities | Compact

3. Open the table in design view, and rename the field, e.g.:
EmployeeName

4. Make the change in any queries, forms, or reports that use this as well.

It sounds like you have 2 tables, such as Employee and Performance.
The Employee table should have a primary key, e.g. add this field:
EmployeeID AutoNumber mark as primary key.

Then the Performance table should have this field instead of the Name field:
EmployeeID Number

Then recreate the relationship between the 2 tables, using Relationships
from the Tools menu.

This guarantees that the data works correctly, and even copes with someone
changing names.
 
Back
Top