Link to home
Start Free TrialLog in
Avatar of daintysally
daintysallyFlag for United States of America

asked on

How to populate field on a new form with value from another form

Hi Experts,

I need to have the values typed in or selected on one form populate the same values on another form.  How can I  do this?
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

depends on how you are opening the 2nd form and what you are using it for?  You would not generally have two data entry forms that contain the same information, so perhaps you need to open the 2nd form to a particular record that has already been created.

If you can explain a bit more about what you are trying to accomplish, I'm sure we can help you find a acceptable solution.
Avatar of daintysally

ASKER

Each form that is opened has a customer first name and customer last name field.  Instead of typing that info on every form, can it auto populate the forms with the info keyed in on the first form?
ASKER CERTIFIED SOLUTION
Avatar of Paul Cook-Giles
Paul Cook-Giles
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The data is being entered on separate forms that will be printed.  And the values will be uploaded to separate tables.  What about populating the field with a selection made from a combo box...can that be done?
I have tried =[Forms]![Myfirstform]![LastName] and it only gives me the default "select" value instead of the value chosen from the drop down.
Dale, does she need .Value?
.value isn't doing anything either
It doesn't give me the value selected from the combo box on the first form
Is the first form still open?  Many times, when you use control wizards for creating the application, it will open the new form and close the original.  If the original form closes, there will be no value and the 2nd form will popup an inputbox assuming that the reference to the other form is a parameter.

1.  If you are going to be printing the 2nd form, then you probably need a report, not a form.

2.  "And the values will be uploaded to separate tables."    You would not normally enter the same values in multiple tables.  Doing so would require you to edit data from multiple tables if you needed to change the information.  Normally, you would enter the data into one table and then use a unique value (usually an autonumber field) to refer to the data in the 1st table in subsequent table.  As an example, you would create an employees table with EmpID (autonumber), LastName, FirstName and other fields.  If you need to reference a specific employee in another table, then you would use the EmpID field as a long integer field (foreign key) in the 2nd, 3rd, ... table.
There are foreign keys set up on the tables...and the second form is not uploading to another table....I misspoke.  I need the values from the first form, so that the selections won't have to be made again in the second form.
Did you answer the question: Is the 1st form still open?

Can you post the code you are using to open the 2nd form?  

Since you refer above to a combo box, what is that combo box used for?  Does the combo include multiple columns?  Are you trying to get the value of the primary key from the combo, or the values of the other fields displayed in the combo?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial