hyperlink instead of a button

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
 
R

Rick Brandt

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top