Roni Sutton
Registered User.
- Local time
- Today, 16:07
- Joined
- Oct 18, 1999
- Messages
- 68
I have a form that will have multiple users. It opens to the first record in the query. If someone is currently using that record (not necessarily making changes, but has that record open) I want the form to move to the next record. I think my code should look something like:
dim db as database
dim rs as recordset
dim sqlstr as string
set db=currentdb()
sqlstr = "" **(this will be the same sql string that the form query is based upon)
rs = db.openrecordset(sqlstr)
rs.movefirst
do while *** someone is in the record
**check to see if someone is in the record
**if someone is in the record, rs.movenext
**else docmd.gotorecord the current record
loop
My loop theory may not quite be valid, but I can work on that part, all I need to know is how do I check to see if someone is in the record. (I don't want to use record locking since it really locks pages of records, not individual records.) Thanks, Roni
dim db as database
dim rs as recordset
dim sqlstr as string
set db=currentdb()
sqlstr = "" **(this will be the same sql string that the form query is based upon)
rs = db.openrecordset(sqlstr)
rs.movefirst
do while *** someone is in the record
**check to see if someone is in the record
**if someone is in the record, rs.movenext
**else docmd.gotorecord the current record
loop
My loop theory may not quite be valid, but I can work on that part, all I need to know is how do I check to see if someone is in the record. (I don't want to use record locking since it really locks pages of records, not individual records.) Thanks, Roni