Jump to content

So I need some help with vba coding in Access.

 

I'm trying to loop through buttons one set of buttons and make them visible, set the focus to one of those buttons then loop through the other set and set them to invisible.

 

The buttons are called Report1,Report2 etc. and Main1, Main2 etc.

 

This is what I've tried so far. Basically i'm trying to add the current "e" or "i" to the end of the button name, if that makes sense

For e = 1 To 4Me.Report&e.Visible = TrueNext Me.Report4.SetFocus For i = 1 To 7Me.Main& i.Visible = FalseNext

and here's the error i'm getting in Access 

http://puu.sh/bYKOU/85f9381c93.png

Link to comment
https://linustechtips.com/topic/227291-need-help-with-vba-in-access/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×