View Full Version : Choice of bmp on command buttons


xod
03-15-2002, 01:25 AM
Hi.

I have a form and on that form is a command button which links to a
form which is used to hold notes. If no notes are on the notes form
(if it's null) I want the command button to have a grey bmp on it.
But if the notes form has data in the box (if not null) I want the
command button on my 1st form to appear as a red bmp.

It seems simple yet is causing me some bother.

Can anyone provide any help/suggestions?

Cheers
Phil

Fornatian
03-15-2002, 01:53 AM
The task you need to perform is this:

Dim strFrmNotes as string
strFrmNotes = "NotesForm"

If Forms(strFrmNotes).RecordsetClone.RecordCount > 0 Then
me.BtnGotoNotes.Enabled = True
Else
me.BtnGotoNotes.Enabled = False
End If

This will only work if the notes form is open.

Using the enabled property will grey/ungrey.

Ian