Excellent, thanks !!
I have discovered another workaround. Make textboxes working like buttons
a combination of conditional formatting and procedure
Create a text box.
properties -->source:
=ScoreCount([ProductID])
Public Function ScoreCount(In_ProdID As Long) As String
Dim vScoreCount As Integer
vScoreCount = DCount("[ProductID]", "tblProductScore", _
"[ProductID] = " & In_ProdID)
If vScoreCount = 0 Then
ScoreCount = ""
Else
ScoreCount = "Click For Details"
End If
End Function
Then go to conditional formatting
format the textbox to "disable" if null and show text if equals to "Click
For Details"
if i make the button grey and raised, it halfs looks like a button.
of course when you mouse over it, it doesnot turn into a select
pointer..... oh well.
so for each record, ScoreCount will run and depending on the return value,
show / hide button !
Cheers!
Graham R Seach said:
Thanks to the wizardry of Stephen Lebans (
http://www.lebans.com), there
is a sample of how to achieve this effect (somewhat) using
ConditionalFormatting here:
http://www.lebans.com/conditionalformatting.htm
A2K or Higher Only!
A2KConditionalFormatting.zip is a sample MDB demonstrating how to
programmatically setup Conditional Formatting to simulate:
1) Highlighting of the Current Row for a Form in Continuous or Datasheet
View
2) Highlighting of Alternate Rows for a Form in Continuous or Datasheet
View
...but you can adapt it to your requirements.
Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html