Good Evening All,
Having an issue of displaying navigation buttons and text string of
x of xx records.
The following code is used:
Private Sub Form_Current()
Dim tmpRcdCnt As Long
Dim tmpCurrentRcd As Long
On Error Resume Next
tmpRcdCnt = Me.Recordset.RecordCount
tmpCurrentRcd = Me.CurrentRecord
If tmpRcdCnt < 2 Then
Me.FormFooter.Visible = False
Exit Sub
Else
Me.FormFooter.Visible = True
End If
If tmpCurrentRcd = 1 Then
Me.CmdBack.Enabled = False
Else
Me.CmdBack.Enabled = True
End If
If tmpCurrentRcd = tmpRcdCnt Then
Else
End If
If tmpCurrentRcd >= tmpRcdCnt Then
Me.CmdNext.Enabled = False
Else
Me.CmdNext.Enabled = True
End If
Me.LblrecordCounter.Caption = _
"Record " & tmpCurrentRcd & " of " & tmpRcdCnt
End Sub
When the code is single stepped everything works great but at normal speed
the nav buttons and caption do not appear. There are at least 3 records
in the record source. FYI this is in one subform and a duplicate in a
secord subform (2nd form has 2 records). The subforms are used to compare
entries and decisions are made on the differences (update first form with
data from second form, include the 2nd form's record into the 1st form, or
ignore the 2nd form's data). Nav controls located in footer.
Is there something I am missing when trying to display the nav controls?
Using Access 2010 on Windows 7 and 8.1.
Rod
Posted by: desertscroller@cox.net
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar