[AccessD] amending code for variable form name - Syntax help

Stuart McLachlan stuart at lexacorp.com.pg
Tue Jul 15 01:33:46 CDT 2008


Just use frmCallingForm.Visible =True

Since you have dimmed the variable as a Form, you don't need the Forms!....Form bit.



On 15 Jul 2008 at 14:57, Kath Pelletti wrote:

> Need some syntax help.
> 
> I need to set a form's visible property to true. It works if I explicity use the form name, eg. 
> 
> Forms!frmPersonDetails.Form.Visible = True
> 
> But where I use a variable eg:
> 
>     Forms!frmCallingForm.Form.Visible = True
> 
> it doesn;t. How do I amend the code to include the variable frmcallingform? The code which creates and sets the variable form name is shown below:
> 
> Dim frmCallingForm  As Form
> Set frmCallingForm = Forms("frmPersonDetails")
> 
> 
> ______________________________________
> Kath Pelletti
> Software Design and Solutions Pty Ltd
> Ph: 9505-6714
> Fax: 9505-6430
> kp at sdsonline.net
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com





More information about the AccessD mailing list