Solved

How populate 2nd form opened with value from selected record in 1st form

Posted on 2014-01-09
1
631 Views
Last Modified: 2014-01-09
I have a form which has a subform.  On the subform is a numeric field named ID.  This field is a hyperlink.  When the user clicks it a 2nd form opens.  On this 2nd form is a field also named ID.  I want the value of the field on the 2nd form to be the same value as the ID field on the 1st form (subform).

But it has to get the value from the SELECTED record on the 1st form.

I have this in the default value of the 2nd form but it isn't working because its not using the selected record.  How do I fix this?

=[Forms]![subfrmPets]![txtID]
0
Comment
Question by:SteveL13
1 Comment
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 39768283
change this

=[Forms]![subfrmPets]![txtID]

with

=[Forms]![NameOFMainForm]![subfrmPets].form![txtID]


or if the name of the subform control is not "subformPets", use

=[Forms]![NameOFMainForm]![Nameof subfrmPets Control].form![txtID]
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question