Can't Assign A Value After Making a Subform Visible

C

cp2599

The subform (which adds records to a table) is not visible when the
form is opened. The user clicks an option button and the form opens.
Try to enter data into a field on the subform and receive this error:
Can't Assign a Value. If I make the subform visible when the form is
opened, I do not get this error. Is there anything I can do to avoid
this error from displaying? NOTE: After the message window is closed,
a record is added to the table and I can then enter in the value.
 
J

Jeanette Cunningham

I suggest that instead of opening the subform, you toggle its visibility.
Set it to visible = no on its property sheet.
Click the button to make the subform visible.
I have used this before and I don't recall any problems with entering data
in the subform.

Usually with a form and subform, Access opens the subform before the main
form.
I think it makes sense to let access open the form with the subform - you
can get the effect of opening the subform by showing it from its hidden
state.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 

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

Top