M
MBoozer
I hope I'm not posting too much. I have general question regarding lebans and
access' custom navigation buttons. Steve did a great job of creating the
code. However, I use a lot of them in my forms and trying to keep track of
the call routineswas getting kind of hairy but I got use to it. I then
started to notice that sometimes they "stick" and don't go to the end record
for a total count (Displays 1 of 1 record when it should be 1 of 3 records).
At first I thought this was a bug in lebans code and tried something else
like the following code on my form's oncurrent event that I also found on the
Net. Guess what? It still hangs when you open the form. If you click the next
button, it will then show record 2 of 3 and works from there on (until of
oourse you close the form and then reopen it). This has been an intermittment
problem that seems to come and go. Sometimes reinstalling lebans form will do
the trick. Sometimes it won't. Am I missing something or is this just the way
it is with custom navigation buttons? The code oncurrent is as follows:
'Start custom navigation buttons
If Me.NewRecord Then
Me!lblNavigate.Caption = "New Record"
Else
With Me.RecordsetClone
.Bookmark = Me.Bookmark
Me!lblNavigate.Caption = "Record " & Me.CurrentRecord _
& " of " & Me.Recordset.RecordCount & " Suppliers "
End With
End If
'btnNext.Enabled = CBool(Me.CurrentRecord - 1)
'btnNext.Enabled = Not Me.NewRecord
'btnNext.Enabled = (Me.CurrentRecord < Me.RecordsetClone.RecordCount)
'btnLast.Enabled = CBool(Me.CurrentRecord - 1)
'btnLast.Enabled = Not Me.NewRecord
'End custom avigation buttons
access' custom navigation buttons. Steve did a great job of creating the
code. However, I use a lot of them in my forms and trying to keep track of
the call routineswas getting kind of hairy but I got use to it. I then
started to notice that sometimes they "stick" and don't go to the end record
for a total count (Displays 1 of 1 record when it should be 1 of 3 records).
At first I thought this was a bug in lebans code and tried something else
like the following code on my form's oncurrent event that I also found on the
Net. Guess what? It still hangs when you open the form. If you click the next
button, it will then show record 2 of 3 and works from there on (until of
oourse you close the form and then reopen it). This has been an intermittment
problem that seems to come and go. Sometimes reinstalling lebans form will do
the trick. Sometimes it won't. Am I missing something or is this just the way
it is with custom navigation buttons? The code oncurrent is as follows:
'Start custom navigation buttons
If Me.NewRecord Then
Me!lblNavigate.Caption = "New Record"
Else
With Me.RecordsetClone
.Bookmark = Me.Bookmark
Me!lblNavigate.Caption = "Record " & Me.CurrentRecord _
& " of " & Me.Recordset.RecordCount & " Suppliers "
End With
End If
'btnNext.Enabled = CBool(Me.CurrentRecord - 1)
'btnNext.Enabled = Not Me.NewRecord
'btnNext.Enabled = (Me.CurrentRecord < Me.RecordsetClone.RecordCount)
'btnLast.Enabled = CBool(Me.CurrentRecord - 1)
'btnLast.Enabled = Not Me.NewRecord
'End custom avigation buttons