Solved

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

Posted on 2014-01-09
1
624 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 119

Accepted Solution

by:
Rey Obrero earned 500 total points
Comment Utility
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

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now