Saleve
asked on
Not a valid bookmark error
Hello,
I have created recordset RecipesRS and would like to bookmark the record previous to the one showing on the unbound form:
Dim varBookmark As Variant
Set RecipesRS = db.OpenRecordset("SELECT " & strTableName & ".* FROM " & strTableName & " ORDER BY " & strTableName & ".txtCourse;", dbOpenDynaset)
'The user can scrolll through the recordset in a form.
****************
'This is the part that doesn't work:
RecipesRS.MovePrevious
varBookmark = RecipesRS.Bookmark
I get run-time error '3159': Not a valid bookmark.
Does anyone know what I'm doing wrong?
Thank you.
Saleve
I have created recordset RecipesRS and would like to bookmark the record previous to the one showing on the unbound form:
Dim varBookmark As Variant
Set RecipesRS = db.OpenRecordset("SELECT " & strTableName & ".* FROM " & strTableName & " ORDER BY " & strTableName & ".txtCourse;", dbOpenDynaset)
'The user can scrolll through the recordset in a form.
****************
'This is the part that doesn't work:
RecipesRS.MovePrevious
varBookmark = RecipesRS.Bookmark
I get run-time error '3159': Not a valid bookmark.
Does anyone know what I'm doing wrong?
Thank you.
Saleve
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello everyone and thank you for your input. I will be away for a few days and will look at this as soon as I get back. I apologize in advance for the delay in assigning points.
Saleve
Saleve
ASKER
My sincere apologies for the delay. Ive been out of town& Thank you for your answers and patience!
ASKER
I actually have code to fill in the fields on the form, as well as to deal with the first record, but thanks for the input. The accepted solution works for the second record in the recordset ONLY, so I guess my problems go deeper than just this issue....
Or Alternatively maybe Dim varBookmark as object
Gary