Refreshing Records

  • Thread starter Thread starter CSDunn
  • Start date Start date
C

CSDunn

Hello,
I have two users that share an application and view data through a form. The
form's Default View propery is set up to Single Form. I need to have
something set up so that when one of the users makes a change to data
through the form, the other users can see the change without having to close
and reopen the form. I have tried to use 'refresh' so the other user could
see the update, but it always sends the user back to the very first record.

Is there a way that the user who does not yet see the update to the current
record could see the update while staying on the current record?

I hope this makes sense.

Thanks for your help!

CSDunn
 
I have two users that share an application and view data through a form. The
form's Default View propery is set up to Single Form. I need to have
something set up so that when one of the users makes a change to data
through the form, the other users can see the change without having to close
and reopen the form. I have tried to use 'refresh' so the other user could
see the update, but it always sends the user back to the very first record.

Is there a way that the user who does not yet see the update to the current
record could see the update while staying on the current record?

In your button you need some vba code. You need to know what record the user
is on. Therefore, on the click event (updte button), use something like:

dim bookmark as string
bookmark = me.bookmark
me.refresh
me.bookmark = bookmark

After the refresh the user will return to the record he was on.

Danny
 
dim bookmark as string
bookmark = me.bookmark
me.refresh
me.bookmark = bookmark

After the refresh the user will return to the record he was on.


afterall, I am not sure about the bookmark. Maybe the the bookmarks are
reinitialized during the refresh method. If so, you will have to use the
find method (recordset method!) to find the record again after the refresh
has been called.

Danny
 
Dim varBookMark As Variant
varBookMark = Me.Recordset.Bookmark
Me.Requery
Me.Recordset.Bookmark = varBookMark

Is is not only necessary to requery if a record is inserted/deleted. As far
as I know, the record is only supposed to get updated - therefore the
refresh method.

Danny
 
Yes sorry Refresh does work to update a record.

The Refresh seems to work automatically if the form has the focus.

Mark.

"Danny Nielsen"
 
Thanks for your help with this. I have another issue with this problem, and
will put up another post to address it.

CSDunn
 
Back
Top