Question : VBA concatenation of form names

I have a form that I need to set the visible property to true or false.  How can I set this up so that I can use a variable in where CompanyContacts is

Me.subfrm_CompanyContacts.Visible = True

I tried this but it won't work.

Me.subfrm_ + tableName + .Visible = True

Answer : VBA concatenation of form names

use this format

me("subfrm_" & tableName).visible=true

or

Forms("nameoFMainform")("subfrm_" & tableName).visible=true
Random Solutions  
 
programming4us programming4us