Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetValue macro alternatives?

Status
Not open for further replies.

mavog

IS-IT--Management
Jun 12, 2003
25
GB
Here's what i've got at the moment:
Access 2002 with 1 main menu form that opens other forms via macros.
In these macros are several setvalue command,
e.g. SetValue [Forms]![Company Details]![Label Edit].[Visible] ,Expression = TRUE
Is there a way to code this in VB? If I try to convert the macro, it just gives me code that runs the macro.
 
Hi mavog,

That's a nice easy one! In VBA ...

Code:
[Forms]![Company Details]![Label Edit].[Visible] = True

Enjoy,
tony
 
Unfortunately this gives me a run-time error '424' object required. :(
Do I need to openForm before changing the label properties?
 
Hi mavog,

Yes, the form must be open; you must also have it open for the Macro to work. Only open Forms are in the Forms Collection.

Enjoy,
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top