Unbound Labels as Command Buttons

G

Guest

I've seen a couple of posts that are similar but not quite so I'll have to ask.

I'd like to use a label as a pseudo web page select function command on a
continuous form, the buttons look too horrible - I'm creating a mock up
before going to Visual Web Developer.

I've tried just altering the code from the wizard but the label doesn't seem
to have the same underlying property as the command button.

Sure the on_click event works brilliantly but it doesn't use the
stLinkCriteria.

Any workarounds?

Many thanks
 
A

Arvin Meyer [MVP]

F

fredg

I've seen a couple of posts that are similar but not quite so I'll have to ask.

I'd like to use a label as a pseudo web page select function command on a
continuous form, the buttons look too horrible - I'm creating a mock up
before going to Visual Web Developer.

I've tried just altering the code from the wizard but the label doesn't seem
to have the same underlying property as the command button.

Sure the on_click event works brilliantly but it doesn't use the
stLinkCriteria.

Any workarounds?

Many thanks

stLinkCriteria is unnecessary anyway, and is just a contrivance of the
wizard.

Dim stLinkCriteria as String
stLinkCriteria = "[RecordID] = " & [RecordID]
DoCmd.OpenReport "ReportName", acViewPreview, , stLinkCriteria

In my opinion, the above 3 lines are no better than just using:

DoCmd.OpenReport "ReportName", acViewPreview, , "[RecordID] = "&
[RecordID]

And, because there are 2 less lines of code, there are 2 times less a
change of error.
 

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