Is it possible to know when the user is on the last record of the form and
only have a button active on that record and in active for all the other
records?
Thanks in advance
Paul B. - 29 Mar 2005 22:15 GMT
Try adding this the the Form_Current event.
You'll need to add your own command buttons, because I don't know if you can
make this code reference the record selectors on the forms and you'll have to
rename the 'FirstRecordButton' part to match your command button names.
--------------
Me.FirstRecordButton.Enabled = (Me.CurrentRecord > 1 )
Me.PreviousRecordButton.Enabled = (Me.CurrentRecord < 1)
Me.RecordsetClone.Movelast
Me.NextRecordButton.Enabled = (Me.CurrentRecord < _
Me.RecordsetClone.RecordCount)
Me.LastRecordButton.Enabled = (Me.CurrentRecord < _
Me.RecordsetClone.RecordCount)
---------------
HTH
> Is it possible to know when the user is on the last record of the form and
> only have a button active on that record and in active for all the other
> records?
>
> Thanks in advance
Graham Mandeno - 29 Mar 2005 22:16 GMT
Hi John
Put some code in your Form_Current event procedure to compare CurrentRecord
with RecordCount:
cmdMyButton.Enabled = Me.CurrentRecord < Me.Recordset.RecordCount

Signature
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand
> Is it possible to know when the user is on the last record of the form and
> only have a button active on that record and in active for all the other
> records?
>
> Thanks in advance