Link to home
Start Free TrialLog in
Avatar of vihaan
vihaan

asked on

ms access use of bookmark

Hi this must be most idiotic question. But Please help me

I used bookmark porperty with some help. But when i had the code

me.bookmark = rs.bookmark  ( in a forms event ).

The question is what is the use of that line actually. I read about the bookmark property it says , each record in a forms recordset will be having a unique bookmark ( lets say unique number assigned to it ). But i still did not understand the purpose of me.bookmark = rs.bookmark and

when i found the record i am looking for. I cannot scroll to the other recrods on the form . THe scrolling gets locked .Can you help me in unlocking it. please help me . I will explain it again, if its not straightforward. Thank You.
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

A typical use of the Bookmark is as follows.
Lets say you have a unbound Combobox in the Header of a Form (continuous or form view) ... to select say a Company Name.  So, in the AfterUpdate event of the combo, you do a FindFirst on the RecordsetClone of the Form to locate that record.  Then ...you do what you showed above:

me.bookmark = rs.bookmark  ' rs is the recordset variable for the RecordsetClone

This causes (forces) the Form to 'go to' that record.  So, it's a way to find a record and then go to it.

Does that make sense ?

mx
Avatar of vihaan
vihaan

ASKER

ya kind of so it just shows the the record we are looking for on the form.


And  one more thing is that if the formis showing total 20 records. And i used the bookmark property to got 15th record on the opening of form. Once the form opens and shows the 15 the record , , it does not lets me to scroll through the other records. SO if i want to scroll through the records. what should i do. Thanks for responding.
Well, I don't know. I would have to see that.
Right now ... I need to zzzzzzz.

mx
Avatar of vihaan

ASKER

ok thanks though then
Setting or retrieving the Bookmakr won't "lock" your recordset from moving, so I'd suspect something else is occurring. We'd need to see the entire code block where you're using this to be able to provide additional assistance.

If you're setting a Filter when the form opens, then you'd not be able to move to other records unless you removed that Filter.
Agree with Scott (LSM) that something else is involved.  Besides a filter, do you have the forms Navigation Buttons enabled?
Confirming: Something else is going on :-)
Joe,

Thanks for the confirmation.  Those zzzzzz's sure did help.
Hey ... a LOT of folks have been 'confirming' my posts as of late.  I won't say anymore about that.

mx
vihaan:
Can you upload an MDB that does this?

mx
ASKER CERTIFIED SOLUTION
Avatar of Helen Feddema
Helen Feddema
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of vihaan

ASKER

good