A
Al Camp
Folks,
I realize this will be a tough question to answer, but I thought I'd give
it a go... perhaps someone has run into this problem.
I use an old Ken Getz Access 2.0 custom Navigation Buttons routine that
I've used through the years with 95/98/2000.
When I use that code in 2003, record to record navigation works fine,
but... going to a New record causes a "No Current Record" error.
The buttons and code were Cut & Pasted ...
If I place the "Access" default nav buttons on the form... they work just
fine.
Both the Main and Subform queries/recordsets are updateable, and linked
One to Many on a Long field.
All "Allows" are Yes.
It appears as though 2003 is having a problem with the old code.
***The form's OnCurrent runs this external module code...
Sub ahtHandleCurrent(frm As Form)
Dim rst As Recordset
Dim fAtNew As Integer
Dim fUpdateable As Integer
Set rst = frm.RecordsetClone
fAtNew = AtNewRecord(frm)
fUpdateable = rst.Updatable And (frm.DefaultEditing <= 2)
frm!cmdNew.Enabled = IIf(fUpdateable, Not fAtNew, False)
' the remaining code just enables disables the buttons....
***This is where the code fails...
Private Function AtNewRecord(frm As Form)
Dim strBM As String
Const NO_CURRENT_ROW = 3021
On Error Resume Next
strBM = frm.Bookmark ' *** Fails...frm.BookMark = No Current Record
AtNewRecord = (Err = NO_CURRENT_ROW)
On Error GoTo 0
End Function
Thanks for any assistance...
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
I realize this will be a tough question to answer, but I thought I'd give
it a go... perhaps someone has run into this problem.
I use an old Ken Getz Access 2.0 custom Navigation Buttons routine that
I've used through the years with 95/98/2000.
When I use that code in 2003, record to record navigation works fine,
but... going to a New record causes a "No Current Record" error.
The buttons and code were Cut & Pasted ...
If I place the "Access" default nav buttons on the form... they work just
fine.
Both the Main and Subform queries/recordsets are updateable, and linked
One to Many on a Long field.
All "Allows" are Yes.
It appears as though 2003 is having a problem with the old code.
***The form's OnCurrent runs this external module code...
Sub ahtHandleCurrent(frm As Form)
Dim rst As Recordset
Dim fAtNew As Integer
Dim fUpdateable As Integer
Set rst = frm.RecordsetClone
fAtNew = AtNewRecord(frm)
fUpdateable = rst.Updatable And (frm.DefaultEditing <= 2)
frm!cmdNew.Enabled = IIf(fUpdateable, Not fAtNew, False)
' the remaining code just enables disables the buttons....
***This is where the code fails...
Private Function AtNewRecord(frm As Form)
Dim strBM As String
Const NO_CURRENT_ROW = 3021
On Error Resume Next
strBM = frm.Bookmark ' *** Fails...frm.BookMark = No Current Record
AtNewRecord = (Err = NO_CURRENT_ROW)
On Error GoTo 0
End Function
Thanks for any assistance...
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions