I would like to get the Caption of the Data Control to illustrate the record number of the current record from the table and database being accessed. However, many of the commands associated with either VB or Access are not compatible with one another. For example, neither "AbsolutePosition" nor "CurrentRecord" work here.
I would like this line of code "DatItemPrice.Caption = "Record" to have the record number appended to it.
Thanks,
Tripoli
Option Explicit
Public gdbCurrent As Database
Private mrstCurrent As Recordset
Private Sub Form_Load()
Unload frmEx2
Set gdbCurrent = OpenDatabase("A:\Chapter.08\Exercise\Steel.mdb"
Set mrstCurrent = gdbCurrent.OpenRecordset("tblPriceList"
'Dim lngrecordnum As Long
'lngrecordnum = mrstCurrent.AbsolutePosition
DatItemPrice.Caption = "Record" & lngrecordnum
The last line of code doesn't work - any suggestions?
End Sub
I would like this line of code "DatItemPrice.Caption = "Record" to have the record number appended to it.
Thanks,
Tripoli
Option Explicit
Public gdbCurrent As Database
Private mrstCurrent As Recordset
Private Sub Form_Load()
Unload frmEx2
Set gdbCurrent = OpenDatabase("A:\Chapter.08\Exercise\Steel.mdb"
Set mrstCurrent = gdbCurrent.OpenRecordset("tblPriceList"
'Dim lngrecordnum As Long
'lngrecordnum = mrstCurrent.AbsolutePosition
DatItemPrice.Caption = "Record" & lngrecordnum
The last line of code doesn't work - any suggestions?
End Sub