View Full Version : Lablel Message


thingssocomplex
03-18-2009, 03:02 AM
I am very,very much a novice with VBA hence why I am here for assistance...

I have a query with a iff statement which displays results that are greater then. Is it possible if the condition is true and items greater then are displayed in the query to have a message appear on the form stating something like "Greater Results Present" I want this so users can be fully aware they exist and action accordingly.

I would be grateful for any assistance and hope I've made sense

DCrake
03-18-2009, 06:31 AM
You can place a label on a form and if the condtion is met then you can do..

If Condition is True Then
Me.Label.Caption = "Blah Blah Blah"
Else
Me.Label.Caption = ""
End If

thingssocomplex
03-18-2009, 07:32 AM
Hi DCrake,

The code I use is in SQL to create the greater than using a IIF statement, and true it will return "Valid" if false "Not Valid" are you stating I would have to write this in VBD for it to appear on a message in form that would say "Check 'Not Valid' Entries"

I basically want the form to display this message if the any entries within the query table return a 'Not Vaild' entry(s) so that the user is aware they need to check, because of late they are forgetting to open the query to check, hence why I want the form to display a alert

DCrake
03-19-2009, 01:09 AM
Ok

So do a DLookup on the query testing for "Not Valid" in the appropriate field. Then respond accordingly.

David