Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show a paper clip icon when a control is not null?

Status
Not open for further replies.

gusbrunston

Programmer
Feb 27, 2001
1,234
US
Hi. I've searched for this with no luck.

Some of the records in a table have a comment entered in a control...many do not. I'd like to put an icon (like the paper clip that shows there is an attachment to an email in Outlook Express) in the single rows in a continuous record subform when the record does have a comment. Or, if I could use this face as an example:
Code:
   12/03/2001  119.50   86.00     2.00
   12/04/2001   16.50    0.00   175.00
   12/05/2001  500.00  100.00   200.00
:-I 12/05/2001  250.00   75.00 1,280.00
   12/07/2001   23.50   45.00   650.00
   12/15/2001   95.00   16.00   950.00

So the face (or, preferably a little icon of a paper clip) indicates that the fourth record in the list has a comment in the "txtComment" control for that record, and needs attention from some user passing by.

I tried some code like this:
Code:
   ' imageClip is an image control
Code:
   If IsNull(Me.txtComment) Then
     Me.imageClip.Visible = False
   Else
     Me.imageClip.Visible = True
   End if

That got me an error message that it was an improper use of the function "Visible".

Pardner, I'd sure appreciate some help on this one...

Gus Brunston :cool: An old PICKer, using Access2000. Celebrating this year my 72nd birthday and my 50th wedding anniversary.
padregus@attbi.com

 
Hello Gus!
First off congratulations on your birthdate and your 50th anniversary! Two wonderful occasions - and with my best wishes!

Using 2000, you have the wonderful feature 'conditional formatting', which when used on a continuous form would allow you to say, turn a checkbox on or off, change the color of the entire row or just one field, in order to indicate something as you have requested. You might consider to try this using the "Expression Is" choice available.

Another option is this and can be placed in a single forms on timer event:

Static Flash As Integer
If Not IsNull(me.Comment) Then
If Flash Then
Me.lblSeenotes.Visible = True
Else
Me.lblSeenotes.Visible = False
End If
Flash = Not (Flash)
Else: Me.lblSeenotes.Visible = False
End If

lblseenotes is just a label that says "See notes..." but I don't think there would be any difference if you used it with an image. This would cause the label to flash on and off every x duration, where x is the number you set in the single forms timer interval (1000 = 1 second).

I hope this gives you some ideas Gus, and again, Best wishes! :) Gord
gord@ghubbell.com
 

Hey, Gordon! It's good to hear from you. I hope the cold has not been too severe this year, and so close to the North Pole.

Thanks so much. You know, I've used conditional formatting to change row colors, turn off the display of zero amounts, etc. But I never thought of it in this instance. Thanks for bringing me back to my senses. Haven't been able to do the work yet, but I'm sure that's the place to do it.

One caveat: e.g., when I use conditional format to "paint" out zero amounts, there is a little bit of a delay when 20 or so continuous records are displayed...the zero amounts display for a brief moment then go out like the plug's been pulled. If you know of any way to avoid that...let's see, I'll think about it too. I'm getting lazy.

My best wishes and gratitude.

Gus Brunston :cool: An old PICKer, using Access2000. Celebrating this year my 72nd birthday and my 50th wedding anniversary.
padregus@attbi.com

 
So close to the North Pole... LOL This winter's been a piece of cake (and now watch me eat my words!)...

Ok, try this: reverse your display conditions: Instead of painting out the zeros, have CF paint them in? Would that work for you?

;-) Gord
gord@ghubbell.com
 

Lot's of ideas stirring...

Maybe "paint in" non-zero amounts... Maybe ctl.visible = True if not isnull... This is more fun than crossword puzzles!

Thanks Gus Brunston :cool: An old PICKer, using Access2000. Celebrating this year my 72nd birthday and my 50th wedding anniversary.
padregus@attbi.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top