[AccessD] Refer to Forms as variables...

Jurgen Welz jwelz at hotmail.com
Mon Oct 5 10:48:35 CDT 2009


Both of the following should work:

 

Dim frm as Form

Set frm = [Forms]![ITPMO_frmMenu_ResourcesHumans]![ITPMO_frmResources_People_].[Form]
frm.Requery

 

or

 

dim strFormName as string

dim strSubFormControlName as string

 

strFormName = "ITPMO_frmMenu_ResourcesHumans"

strSubFormControlName = "ITPMO_frmResources_People_"

Forms(strFormName)(strSubFormControlName).Form.Requery


Ciao Jürgen Welz Edmonton, Alberta jwelz at hotmail.com


 
> Date: Mon, 5 Oct 2009 15:10:47 +1100
> From: Darryl.Collins at anz.com
> To: accessd at databaseadvisors.com
> Subject: [AccessD] Refer to Forms as variables...
> 
> Hi All,
> 
> I know I have done this before, but now I can't seem to get it to work
> right now - not much joy on Google. Bah Humbug and Grrrr. Using A2003.
> 
> This works
> [Forms]![ITPMO_frmMenu_ResourcesHumans]![ITPMO_frmResources_People_].[Fo
> rm].Requery
> 
> But what I want to do is this:
> [Forms]![& gstrFormName & ]![ & gstrSubForm & ].[Form].Requery
> 
> Where gstrFormName = "ITPMO_frmMenu_ResourcesHumans"
> And gstrSubForm ="ITPMO_frmResources_People_"
> 
> Anyone got any pointers?
> 
> Cheers
> Darryl.
> 
> "This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any of its related entities including ANZ National Bank Limited (together "ANZ"). ANZ does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication."
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
 		 	   		  
_________________________________________________________________
Click less, chat more: Messenger on MSN.ca
http://go.microsoft.com/?linkid=9677404


More information about the AccessD mailing list