pass data one form to another form

G

Guest

Good morning:

I have a problem due to my lack of knowledge, that consists of the
following: I have two forms (MP and OT) and I want to pass data of the form
MP for the form OT, starting from button in the form MP. What is that turns
my head around, it is to pass the data of the subforms. I send together the
BD for you to analyze and later help me to reduce the ignorance. Or I can't
send?


Thanks in advance for your cooperation.

Best Regards,
José Leal
 
J

John Vinson

Good morning:

I have a problem due to my lack of knowledge, that consists of the
following: I have two forms (MP and OT) and I want to pass data of the form
MP for the form OT, starting from button in the form MP. What is that turns
my head around, it is to pass the data of the subforms. I send together the
BD for you to analyze and later help me to reduce the ignorance. Or I can't
send?


Thanks in advance for your cooperation.

Best Regards,
José Leal

Please do NOT upload binary attachments to this newsgroup. If anyone
asks you to EMail them a copy of the database, compact it, use WinZIP
to compress it, and email it - but *only* if you are asked.

I think your problem is that you're apparently assuming that Access
stores data in Forms. It doesn't. The data exists in your Tables, and
only in the Tables. The Form is simply a tool to view and edit that
data - it is like a window.

It should NOT be necessary to copy data from one form to another form;
if the data is properly normalized, you can simply base the second
form on a query displaying the data from the same tables where the
first form stored it. If you are trying to copy data from one table
into another table - DON'T. It is NEVER a good idea to store the same
information in two different places. Store it once, and then use
Queries to link to it.

John W. Vinson[MVP]
 
G

Guest

Good day,John:

I need to pass the information of the subform of the form1 for subform of
the form2
Which is the correct expression to pass the field1 of the subform of the
form1 for the field2 of the subform of the form2?

best regards,
José Leal
 
J

John Vinson

Good day,John:

I need to pass the information of the subform of the form1 for subform of
the form2
Which is the correct expression to pass the field1 of the subform of the
form1 for the field2 of the subform of the form2?

best regards,
José Leal

The first question to ask is: WHY?

It sounds like you're trying to store data from one table, redundantly
in a different table. This is NEVER a good idea.

Also, you're assuming (it seems) that data is stored in Forms. It
isn't. A Form is just a tool, a window to let you see and edit data in
your Table. If you DO need to store the data into a field in the
subform of Form2, it's best to get the data directly from the table
(using DLookUp perhaps), not from a Form; you have no way of knowing
that Form1 is even *OPEN*, nor which record is currently selected if
it is.

Stop. Step back a bit. Please explain *what you are trying to
accomplish* in a real-life sense (rather than how you want to
accomplish it); it would be very helpful to also describe how your
tables are structured, and what are the Recordsources of these four
forms.

John W. Vinson[MVP]
 
G

Guest

The form1 is of the preventive maintenance that have the data of a table
(tabel1).
In function of a date of each record of the preventive maintenance, a
workorder (form2 order is generated - tabel2). The work order is filled out
automatically starting from the data of the preventive maintenance plan
(equipment, location, work plans,...).
What I intend to know is the code that I should put, for instance to pass
the field1 of the subform1, for the field2 of the subform2.

José Leal
 
J

John Vinson

The form1 is of the preventive maintenance that have the data of a table
(tabel1).
In function of a date of each record of the preventive maintenance, a
workorder (form2 order is generated - tabel2). The work order is filled out
automatically starting from the data of the preventive maintenance plan
(equipment, location, work plans,...).
What I intend to know is the code that I should put, for instance to pass
the field1 of the subform1, for the field2 of the subform2.

If the work order is to be printed out, create a Report (not a Form)
based on the preventive maintenance table.

It appears that you are either printing a Form, or assuming that you
must store data in a Table to print it out. Neither is correct.

Simply base the Work Order on a Query selecting the necessary fields.
There is no need to copy data to Subform2 to do this.

John W. Vinson[MVP]
 

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