Enable/Disable command button on continuous form

S

Scott A

I have a continuous form with a command button that I
would like to enable/disable depending on whether a field
in a source table contains any data.

I tried this:

If Not IsNull(Me!txtLocation) Then
Me!cmdViewDocument.Enabled = True
Else
Me!cmdViewDocument.Enabled = False
End If

and it doesn't work well (it seems like if when it detects
a non-null value in any of the records displayed on the
continuous form, the button is enabled for all records.

I'm just wondering if it is even possible to have a button
on a continuous form that is enabled for records that
contain X value, and disabled for others where X is null.

Thanks,

Scott A
 
J

JohnFol

I think the short answer is no, as you have a single button that is
appearing multiple times. Change the property once, and you see the change
on all occurences.
 
S

Scott A

John -

Thanks for the answer - always good not to waste time
trying to program the impossible.

Cheers,

Scott A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top