[AccessD] Refer to Forms as variables...

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Mon Oct 5 02:26:25 CDT 2009


Hi Darryl,

Forms(gstrFormName).Controls(gstrSubForm).Form.Requery

should make "the trick" or just

Forms(gstrFormName)(gstrSubForm).Form.Requery


--Shamil


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Collins, Darryl
Sent: Monday, October 05, 2009 8:11 AM
To: Access Developers discussion and problem solving
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.

 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4479 (20091004) __________

The message was checked by ESET NOD32 Antivirus.

http://www.esetnod32.ru
 




More information about the AccessD mailing list