View Full Version : Form entry based on subform selection


speakers_86
08-27-2008, 06:23 AM
I know this is a little reversed of what people usually do, but I think it will make data entry easier for end users.

Here are the objects.
Customer Table
Customer Query that filters current customers
Work Order Form w/ customer sub based on query.

I would like the field "CustomerID" in the work order form to depend on the selection made in the sub.

This is probably easy to do, but if the customer is new, will the user be able to add considering the subform is based on a query of current customers?

Steve R.
08-27-2008, 11:31 AM
I assume that you want a control that is located on the subfrom to duplicate its value on a control in the main form. See this (http://www.mvps.org/access/forms/frm0031.htm).

The code (in the after update event) would like something like this:

Me.Parent!ControlName=Me.SuformControlname