By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 896 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

Indicator in VBA, which syntax?

P: n/a
I'm working on a simple VB code using traffic light displays in a
report. So if a target isn't reach, a bitmap wil lit up using the red
color stop light.
I've used this code, which is working, but I don't know which syntax
you must use to make a calculation with between. So it has to be like
this:
ElseIf Me![tot-tastbaarheid] <= 0.8 * 10 * [weegfactor-tastbaarheid]
!!BETWEEN!!> 0.6 * 10 * [weegfactor-tastbaarheid] Then
Me.Image247.Picture = "C:\Documents and
Settings\GONESHE\Desktop\Nu aan gewerkt\New Folder\Oranje.bmp" --> the
oranje.bmp must lit up when the calculation in the report is between
![tot-tastbaarheid] <= 0.8 * 10 * [weegfactor-tastbaarheid] and !!>
0.6 * 10 * [weegfactor-tastbaarheid]

I was using the AND in the VBA, but that doesn't work.

This is the code as it is right now:

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As
Integer)

If Me![tot-tastbaarheid] < 0.6 * 10 * [weegfactor-tastbaarheid] Then
Me.Image247.Picture = "C:\Documents and
Settings\GONESHE\Desktop\Nu aan gewerkt\New Folder\Rood.bmp"
ElseIf Me![tot-tastbaarheid] <= 0.8 * 10 * [weegfactor-tastbaarheid] >
0.6 * 10 * [weegfactor-tastbaarheid] Then
Me.Image247.Picture = "C:\Documents and
Settings\GONESHE\Desktop\Nu aan gewerkt\New Folder\Oranje.bmp"
Else
Me.Image247.Picture = "C:\Documents and
Settings\GONESHE\Desktop\Nu aan gewerkt\New Folder\Groen.bmp"

End If

End Sub
Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.