CHECK un check

User avatar
sal21
PlatinumLounger
Posts: 4354
Joined: 26 Apr 2010, 17:36

CHECK un check

Post by sal21 »

Ho to permit to the user to check or un check a checkbox1, only if PREZZO is not null?

in this case of the he image, permit check or un check
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78457
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: CHECK un check

Post by HansV »

What is the name of the PREZZO text boxes?
What is the name of the check boxes?
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4354
Joined: 26 Apr 2010, 17:36

Re: CHECK un check

Post by sal21 »

HansV wrote:
10 Oct 2021, 15:08
What is the name of the PREZZO text boxes?
What is the name of the check boxes?
Me.TPREZZO
Me.Check1

User avatar
HansV
Administrator
Posts: 78457
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: CHECK un check

Post by HansV »

Try this (untested, as always):

Code: Select all

Private Sub TPREZZO_AfterUpdate()
    Me.Check1.Enabled = (Me.TPREZZO <> "")
End Sub
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4354
Joined: 26 Apr 2010, 17:36

Re: CHECK un check

Post by sal21 »

HansV wrote:
10 Oct 2021, 16:52
Try this (untested, as always):

Code: Select all

Private Sub TPREZZO_AfterUpdate()
    Me.Check1.Enabled = (Me.TPREZZO <> "")
End Sub
But, i think, textbox in vb6, not have a AfterUpdate, property....

User avatar
HansV
Administrator
Posts: 78457
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: CHECK un check

Post by HansV »

Try the Change event then.
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4354
Joined: 26 Apr 2010, 17:36

Re: CHECK un check

Post by sal21 »

HansV wrote:
10 Oct 2021, 19:00
Try the Change event then.
THIS tip work!
Tks