Obtaining value of a control DLookUp vs...?

JGalletta

Windows 7 Access 2010
Local time
Today, 09:10
Joined
Feb 9, 2012
Messages
149
Hello all,

Thanks for all the help on other subjects and threads. Here is another interesting question:

Is it possible to reference the value of a control in the current record of a subform that is in continuous view from another subform without using DLookUp to reference the value in the underlying table?

Something like:

"Forms!frmMainForm!ChildForm!CurrentRecord.DesiredControl.Value"?

This obviously wouldn't work.. but this is what I'm trying to get at instead of using somthing like:

DLookUp( "DesiredControlValuefromTable", "tblChildFormDomain", "tblChildFormDomain.ChildJoinPK = '" & Forms!frmMainForm!MainFormJoinPK & "'")

Or, is there some other way to accomplish something like this?
 
Ok, that answers my question. Thanks, Pat. I didn't know referencing the control always referenced the first record.

Can you describe in a little more detail how to join to the "lookup table" and use a recordset? Does this involve creating a DAO Recordset and navigating to the correct record?
 
Reading your post again, I think I know what you mean. This would occur in the recordsource of the second subform? I'm assuming you bring the desired table/field into the recordsource query for the subform and it will then show up in the existing fields list when in the design of the second subform? Forgive me if I'm horribly wrong. :)
 

Users who are viewing this thread

Back
Top Bottom