Unbound Labels as Command Buttons

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top