Copy Text Between Form1 and Form2

maviko

Registered User.
Local time
Today, 11:11
Joined
Feb 29, 2004
Messages
14
I have 2 forms which are based on separate tables. When I open Form2 from a command button on Form1, I would like the common boxes on the Form2 (name, ID #, ets.) to automatically copy the info from the boxes on Form1 with the same names. How can I do this? TIA
 
There are ways to do what you're asking but it sounds like what you want is not another form generated by the command button but a subform with relatant keys. To simply copy data from one table and add the same data into another (with the exception of a key) violates normalization.

Are the two tables related via keys? (Ex: ID ?)

Hope this helps...
Regards,
~Chad
 
Actually, the only reason they are 2 different forms is that I have too many fields for just one (well over 300). The original hard copy form was double-sided. All of the information is related via the ID #.
 
maviko said:
Actually, the only reason they are 2 different forms is that I have too many fields for just one (well over 300). The original hard copy form was double-sided. All of the information is related via the ID #.

That's perfectly okay. You can set up a form with tabs so that clicking an alternate tab brings you to your subform. :) If you search for 'multiple-page or tab-control form here or even in the questionable help that ships with Access you should find instructions on how to create a single form that spans multiple pages. If you place your subform on one of the other pages you shouldn't have a space issue. :)

Regards,
~Chad
 
Tab Control Confusion

Sorry for my late reply. I still don't understand what you're saying. If I use the tab control, won't I have to have a common source for both pages (e.g., tblMyTable) in order to make a parent/child link between the common field (MyID) for both forms/tables? I need to use 2 tables, even though the info is basically the same, due to the fact that I'll exceed the 255 field for one table. :confused: (As you can tell, I haven't used this tab control before, nor have I used so many fields!!!)
 
Forms![Formtocopyto].[FieldName]= Me.Fieldyouwanttocopy

Using the code above will let you copy a field from the form that has the focus, the one that just opened, the the form in the background. Just change the names accordingly. ie: Forms![myform].[UserID] = Me.UserID
 

Users who are viewing this thread

Back
Top Bottom