Hi Everybody. I joined today. :duck: :thumb: Yay. Wondering if this is even possible. Much abliged if anyone can help. (I've already been hunting around, ended up trying all manner of things except for summoning the devil with headless chickens. :ehh:)
I've got a form-swapper bunch of images with the 'Tag' component storing the form 'name', ie, you click on an image and it then takes you to the new form. (A bit like the iPhone setout). Works well, if you hard code each. Like this:
------------
{imgPageIcons <- Are the clickable picture images}
{in the Mouseup, left click}
If Button = 1 Then
------------
So the Form Swapper calls the function with the forms passed in variables in the Module. Works a treat.
But, I'd like to do something like this to streamline the code, but I don't know if it can be done.
------------
{in the Mouseup, left click}
If Button = 1 Then Call Form_Swapper(Me, imgPageIcons(Index).Tag) :D <- As you can see the imgPageIcons(Index).Tag is a string and not a form...
The forms are all premade, I just need them to be called from the Tag item. The reason I'm doing this is to make it easy for the other coder to place his modules and forms into the master, so when he makes a new image button, he only has to remember to put in the 'Tag' content of the new form's name. So when running, he clicks the new image and his form appears.
So is there any way to make a string name a form item?
I've got a form-swapper bunch of images with the 'Tag' component storing the form 'name', ie, you click on an image and it then takes you to the new form. (A bit like the iPhone setout). Works well, if you hard code each. Like this:
------------
{imgPageIcons <- Are the clickable picture images}
{in the Mouseup, left click}
If Button = 1 Then
Select Case imgPageIcon(Index).Tag 'read in the 'Tag' string of the clicked Image
Case "Form2"
Call Form_Swapper(Me, Form2) 'Send the original form, and the new form to jump to it'
Case "Form3"
Call Form_Swapper(Me, Form3) 'Send the original form, and the new form to jump to it'
End Select
End If------------
So the Form Swapper calls the function with the forms passed in variables in the Module. Works a treat.
But, I'd like to do something like this to streamline the code, but I don't know if it can be done.
------------
{in the Mouseup, left click}
If Button = 1 Then Call Form_Swapper(Me, imgPageIcons(Index).Tag) :D <- As you can see the imgPageIcons(Index).Tag is a string and not a form...
The forms are all premade, I just need them to be called from the Tag item. The reason I'm doing this is to make it easy for the other coder to place his modules and forms into the master, so when he makes a new image button, he only has to remember to put in the 'Tag' content of the new form's name. So when running, he clicks the new image and his form appears.
So is there any way to make a string name a form item?