Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 9th, 2004, 03:56 PM
Authorized User
 
Join Date: Nov 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Referring to a Subform

Hello,

I have an order entry form that I am trying to populate two fields from a Company form and the subform Contacts. The problem comes up when I try to refer to the subform field to populate the order entry form.
The main form is frmCompanyAccount and the main field is numAccountID.
The subform is frmCompanyContact and the main field is numContactID.

The first statement works:
[numAccountID]= [forms]![frmCompanyAccount]![numAccountID]
The following statements do not:
[numContactID]= [forms]![frmCompanyContact]![numContactID]
or
[numContactID]= [forms]![frmCompanyAccount]![frmCompanyContact]![numContactID]

Any help would be appreciated.

 
Old April 9th, 2004, 04:50 PM
Authorized User
 
Join Date: Feb 2004
Posts: 98
Thanks: 0
Thanked 0 Times in 0 Posts
Default

= ParentControlName.subFormCONTROLName.Form.NameOfCo ntrolOnSubForm

or

= Me.subFormCONTROLName.Form.NameOfControlOnSubForm


Ciao
Jürgen Welz
Edmonton AB Canada
jwelz@hotmail.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
referring to the active project tarongeta VBScript 0 February 21st, 2008 04:52 AM
referring methods from different project in VS ajindal General .NET 1 August 17th, 2006 05:42 AM
Referring to a field and updating Programmatically vmerc Access VBA 4 January 12th, 2006 10:28 AM
How to check referring page? Dave Brown Beginning PHP 6 February 7th, 2005 12:01 PM
Dynamically Referring Web Services in a Appl. chandramuralis .NET Web Services 7 October 1st, 2004 07:25 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.