Form Error Msg

B

Bandit

I have a two tables. One is the purchase order table the other is the
purchase order detail table. I created two forms for each. I made the
purchase order table the main and the detail form the subform. The forms are
linked by POID and the master and child fields reflect this. When enter info
into my purchase order main form, all is well. When I enter info into the
detail subform it allows me to enter and then I get a error msg. "You can't
assign a value to this object: 1) The object may be a control only in read
on your form. 2) The object may be on a form that is open in design view.
3) The value may be too large for the field. I also get this msg if I try to
add more then one enty for the detail subform. I want on purchase order form
and any number of entries into the detail form. Where is my problem?
Thanks in advance, I have learned so much from this site.

Bandit
 
A

Allen Browne

Several things could be going on here.

1. Open the purchase order detail table in design view.
Select the POID field (i.e. the foreign key, that relates to the main
table.)
In the lower pane, delete any zero beside the Default Value property.
Also, set the Required property to Yes, so you cannot have a detail record
that doesn't relate to any purchase order.

2. If that doesn't fix the problem, is the subform based on a query that
uses more than one table? If so, make sure you have the fields from the
correct table in the source query. (For example, you must have the POID form
the purchase order detail table, not from the main p.o. table.) Make sure
you are not trying to assign values to the wrong table. In the other table
(i.e. not the purchase order detail table), remove any Default Value from
the field in the table, and also from the controls on the form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Form Question 5
Scroll Bar in Subform 2
Form/Report Relationship 24
Subform problem 1
Main Form and two Subforms 2
Using subforms for data entry 1
Tabbing between a main form and a subform 1
Help! I know this is long. 1

Top