Confused & Frustrated

Richie2837

Registered User.
Local time
Today, 22:10
Joined
Jan 30, 2007
Messages
88
Hi,

Our Contacts database holds records relating to individual clients. As these clients are visited in their homes, I have put a "Lone Worker Caution" yes/no field on the form to alert staff of potential risks prior to visiting.

To have a more visual signal to staff, I have placed a label (label202) on the form with it's visibility properties set to NO. With a lot of help from other forum users, I have put the following code behind the yes/no check-box, to activate the label and cause it to "flash" in red & black colours:

Private Sub LoneWorkerCaution__AfterUpdate()
If Me.LoneWorkerCaution = True Then
Me.Label202.Visible = True
End If
If Me.LoneWorkerCaution = False Then
Me.Label202.Visible = False

End If

End Sub

Private Sub Form_Contacts()

If Me.LoneWorkerCaution = True Then
Me.Label202.Visible = True
End If
If Me.LoneWorkerCaution = False Then
Me.Label202.Visible = False
End If
Me.TimerInterval = 300
Me.Label202.ForeColor = vbBlack



End Sub

Private Sub Form_Timer()
With Me.Label202
.ForeColor = (IIf(.ForeColor = vbRed, vbBlack, vbRed))
End With


End Sub

Everytime I click the yes/no check box to activate the warning message, VBA opens up with the message "Compile Error: Method or Data Member Not Found".

What does this message mean? What do I have to do (in Plain English please, I'm new at this!) to fix it?
 
can you winzip the file and put this on the post
you do this by
manage attachments below and browse to add file
 
Here is a copy of it, as the original has already been split in FE & BE with an associated workgroup and passwords etc.
 

Attachments

Your attached db is now working with the flashing lables.

The reason that Me.LoneWorkerCaution didn't work was that was NOT the name of your check box Me.LoneWorkerCaution? was its name

I have changed the check box name and the label name.

Couple of things (if you don't mind)

I would never use ? in the name of a control.

Before I posted back your db I removed the images on the form, this reduced the siize of the db from 14.7MB to 396KB (before zip), may I suggest that you link your images and not instert them into a form. How to do this? Do a search in the forum.
 

Attachments

Thanks John that worked perfectly.

Duly noted about the graphics too.
 
Glad someone could sort this

This would have been my first point to check

Sorry Richie that i could not sort this out unable to d/load your zip file properly
but all resolved now
 

Users who are viewing this thread

Back
Top Bottom