navigation button help

rashidzaib

Registered User.
Local time
Today, 01:48
Joined
Aug 12, 2007
Messages
32
hy bro and sis
sorry for disturbance
i have one more question about navigation button "first,last,previous,next"
is there any coding if we r on last record then last and next button is disable.
if we r on first then first and previous button r disable.
any help should realy be appriciated.
thank u
ur truly rashid zaib
take care bye
 
In the forms On_Current event:

Private Sub Form_Current()
On Error GoTo Err_Form_Current

Me.RecordsetClone.MoveLast

Me.cmdFirst.Enabled = Me.CurrentRecord > 1
Me.cmdPrevious.Enabled = Me.CurrentRecord > 1
Me.cmdNext.Enabled = Me.RecordsetClone.RecordCount > Me.CurrentRecord
Me.cmdLast.Enabled = Me.RecordsetClone.RecordCount > Me.CurrentRecord

Exit_Form_Current:
Exit Sub

Err_Form_Current:
Resume Exit_Form_Current

End Sub

Just change your cmdButton names to reflect yours.
Dave
 
navigation help

hy dear bro
i hope u r fine
first of all thank u very much for ur reply. the code u gave me is working fine in single form. but when i used this code on master/detail form it is not working and all button r disable.
i think there some kind of set code is mising can u elaborate this topic and help me in this matter
waiting for ur reply
thank u very much
ur truly rashid zaib
take care bye
 

Users who are viewing this thread

Back
Top Bottom