How do I add a record to a bound field on a subform?

R

Richard Stricker

Hi, i have a form, mostly with product info, and on it i have a subform with
buyer info. The subform tracks the main form ok (finally) but when i try to
enter new information into the subform i get this error message:

"control cant be edited; it's bound to the exression [Buyer_name]"

How the heck do you manage this?

Thanks for any direction,

Richard Stricker
 
J

John W. Vinson

Hi, i have a form, mostly with product info, and on it i have a subform with
buyer info. The subform tracks the main form ok (finally) but when i try to
enter new information into the subform i get this error message:

"control cant be edited; it's bound to the exression [Buyer_name]"

How the heck do you manage this?

What is the Recordsource property of the subform? Please post the SQL. And
what is the Control Source of the textbox? It sounds like Buyer_Name is a
calculated expression (perhaps a concatenation or a DLookUp???) rather than a
field in a table.

John W. Vinson [MVP]
 
R

Richard Stricker

Thanks for helping with this question. I am really tangled up on the
concepts.

I have a product table and a buyers table. They are related by buyer_name in
the buyers table and the buyer_ID in the product table.

The product table is the source for my main form. I want to include the
buyers name and email from the buyers table.

Using the wizard I was able to add a combo box that reflects the buyer for a
particular product. This tracks along as I hoped.

Here is the code for that combo:
control source Buyer_ID
row source SELECT [Buyers].[Buyer_ID], [Buyers].[Buyer_name] FROM Buyers;

Then I have another field for the buyer email (which is from the buyers
table). When I run the form I get a #Name? error in that field.

Here is the code for that field: control source
=[Buyers]![Buyer_contact_email]

You can see I have restructured my original question because I realized I
have no clue about the concepts of combining data from more than one table
on a form.

Should the data from the second table be on subform (my original approach,
but because I wanted to make the form not visible until there was a buyer
for the product, not because I knew what I was doing).

Or should the data reference a query? or be on a subform based on a query
that blends the data?

Thanks for any clarity you can share. I am really confused at this point.
The idea of adding a new record to the buyers table from within the product
form can wait.

Richard


John W. Vinson said:
Hi, i have a form, mostly with product info, and on it i have a subform
with
buyer info. The subform tracks the main form ok (finally) but when i try
to
enter new information into the subform i get this error message:

"control cant be edited; it's bound to the exression [Buyer_name]"

How the heck do you manage this?

What is the Recordsource property of the subform? Please post the SQL.
And
what is the Control Source of the textbox? It sounds like Buyer_Name is a
calculated expression (perhaps a concatenation or a DLookUp???) rather
than a
field in a table.

John W. Vinson [MVP]
 
Top