Solved

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

Posted on 2014-01-09
1
648 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
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 …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

617 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