Subform data entry

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

Guest

I have a form that displays filtered data from table A and allows the user to edit the data in table A. I have created a subform to allow the user to create a new record in table B while viewing the data in table A. There is no way to relate the tables because the user is creating a new record in table B.

Some (but not all) of the fields in the selected record in table A need to be input into the record the user is creating in table B. Is there any way to use the data in the selected in table A to automatically populate some of the fields in the subform to create a new record in table B?

Example: The user selects product 1 from a drop down list & sees the main form which contains various data for this product. The subform requires that the user enter the product number so that a record for that product can be created in an unrelated table. I would like the product number to be automatically entered in the subform based on the field value for the table used in the main form, but I haven;t been able to figure out how to do this.

I am not using code to program. All actions in my program are executed using macros.
 
Marion said:
I have a form that displays filtered data from table A and allows the user
to edit the data in table A. I have created a subform to allow the user to
create a new record in table B while viewing the data in table A. There is
no way to relate the tables because the user is creating a new record in
table B.If a relationship exists creating a new related record is trivial with the
use of a form subform.

Some (but not all) of the fields in the selected record in table A need to
be input into the record the user is creating in table B. Is there any way
to use the data in the selected in table A to automatically populate some of
the fields in the subform to create a new record in table B?
Example: The user selects product 1 from a drop down list & sees the main
form which contains various data for this product. The subform requires that
the user enter the product number so that a record for that product can be
created in an unrelated table. I would like the product number to be
automatically entered in the subform based on the field value for the table
used in the main form, but I haven;t been able to figure out how to do this.
I am not using code to program. All actions in my program are executed
using macros.

Placing data in unrelated tables usually is a mistake in a relational data
base. If the information has any value sooner or later you will have to
write some code to fix the problem.
Your first step should be to evaluate if you actually need an un-related
table in a relational dtatbse ( or database...)
You will almost certainly have to use code to do what you want.
You can use an INSERT INTO or open the table or query in code and place the
values you need.
 
Back
Top