1 of any value (1 Viewer)

stu_c

Registered User.
Local time
Today, 15:44
Joined
Sep 20, 2007
Messages
489
if all
I have the below code, I want to do it so if the value = 1 of any number to hide a button how do you do this?

If Me.TxtBottomBarExaminationNo >= "1 of #" Then
BtnExaminationPrevious.Enabled = False
Else
BtnExaminationPrevious.Enabled = True
End If
 

Ranman256

Well-known member
Local time
Today, 11:44
Joined
Apr 9, 2015
Messages
4,339
you said hide so:
BtnExaminationPrevious.visible = Me.TxtBottomBarExaminationNo>1
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:44
Joined
May 7, 2009
Messages
19,175
[btnExaminationPrevious].Enabled = (Val(Me.txtbottombarExaminationNo & "") > 1)
 

stu_c

Registered User.
Local time
Today, 15:44
Joined
Sep 20, 2007
Messages
489
Many thanks,
If I wanted to extend this further to say instance if record is
1 of 1 then BtnExaminationPrevious.Enabled = False
but
anything other for example 2 of 3 shows the button would this be done in a if statement?
 

stu_c

Registered User.
Local time
Today, 15:44
Joined
Sep 20, 2007
Messages
489
think I have worked it out :)

If Val(TxtBottomBarExaminationNo & "") = 1 Then
[BtnExaminationPrevious].Enabled = True
Else
[BtnExaminationPrevious].Enabled = False

End If
 

Gasman

Enthusiastic Amateur
Local time
Today, 15:44
Joined
Sep 21, 2011
Messages
14,056
Enabled does what it says on the tin?, :confused:
You want the Visible property as Ranman256 indicated.?
 

stu_c

Registered User.
Local time
Today, 15:44
Joined
Sep 20, 2007
Messages
489
have a field with the record number which shows record 1 of 3 example (TxtBottomBarExaminationNo), when the record is on 1 I want the previous record button to be disabled (BtnExaminationPrevious)
 

Users who are viewing this thread

Top Bottom