hyperlink instead of a button

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

I have a form that currently uses buttons to open other forms (or report)
and pass variables.

I would like to replace the buttons with hyperlinks.

I am currently using a label control and set its "hyperlink subaddress"
property to point to the form I need to open. Unfortunately, I can't pass
varialbles that way so I am also using the OnClick event of the label
control to open the form and pass the variables.

Is there a better way of doing this?

Using the OnClick event would be sufficient except that I also want the
cursor to change to a hand when it goes over the control.

Thanks
 
Chuck said:
I have a form that currently uses buttons to open other forms (or report)
and pass variables.

I would like to replace the buttons with hyperlinks.

I am currently using a label control and set its "hyperlink subaddress"
property to point to the form I need to open. Unfortunately, I can't pass
varialbles that way so I am also using the OnClick event of the label
control to open the form and pass the variables.

Is there a better way of doing this?

Using the OnClick event would be sufficient except that I also want the
cursor to change to a hand when it goes over the control.

Use both. If you use a label as a Hyperlink AND use code in the Click
event then you can pass parameters and get the look and feel of a
Hyperlink. The only problem is if your code does a test before it decides
to open the form or not. You cannot do that with a hyperlink unless your
code temporarily changes the hyperlink to point somewhere else.
 
Back
Top