End of Records

Abbos

Registered User.
Local time
Today, 20:42
Joined
May 11, 2005
Messages
64
Hi,

Is it possible to disable the "Next Record" navigation button on a form toolbar when the end of the records is detected?
 
if you mean the one with the record counter, then no.
You can hide it. what are you trying to achive by disabling it?
 
I would like to stop it from creating a new record when the end of the records are reached and the user clicks on the "Next Record" arrow.
 
What about the other methods of stepping into a new record?
You could just set the form to not allow new records from its properties.

Peter
 
Thanks Peter but I need to be able to create new records from the same form. Is this possible as it is proving quite difficult?
 
disable the navigation buttons, and use a button on your form to create new records.

Be aware that you can create your own navigation buttons using the command button wizard.
 
I've tried that already but the problem I have is that I lose the record counter. I wrote some code to display a record counter and total number of records but I then have problems when I apply a Filter to the form.

Code:
Dim TotRecords As Long
Dim CurrentRec As Long
Dim TotRecords1 As Long
Dim CurrentRec1 As Long

CurrentRec = Form_Art_New.CurrentRecord
Me.Text580 = CurrentRec

TotRecords1 = DCount("*", "Arts")
Text582 = TotRecords1

If Me.FilterOn = True Then
Me.Text580.Visible = False
Me.Text582.Visible = False
Me.Label584.Visible = False
End If

That's the code I am currently using with my buttons. The code runs on the OnCurrent event.
 
Code:
Private Sub BtnNew_Click()
Me.AllowAdditions = True
DoCmd.RunCommand acCmdRecordsGoToNew

End Sub

Private Sub Form_AfterUpdate()
Me.AllowAdditions = False
End Sub

set the form to not allow updates in properties and use a button to turn it on again, switch off in forms after update event

Peter
 
It's easy when you know how. Thank you very much Peter.
 

Users who are viewing this thread

Back
Top Bottom