Refresh/Requery Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a database that currently has about 3000 records. There are about 8
users entering imformation through the day sometimes at once. As loans come
in, one person is entering the information but if everyone is in the
database, how are they able to see the new records being inputted? When they
click Add Record does that refresh the form they are looking at? Is there a
way for them to refresh the form? One person said when they tried to refresh,
it got stuck or froze on them using a refresh button. Any help or advice
would be greatly appreciated!!

Thank you!!
 
I don't think Refresh will do it. I would suggest requerying the form each
time a new record is added. You may want to try Me.Requery in the form's
After Update event.

If you want to update the form's recordset periodically whether the user has
entered anything, you could do it with a timer event.

In either case, you will need to reposition the form to the current record.
The Requery repositions to the first record in the recordset. To reposition
to the current record, you will need code something like this. Assume CustID
is the primary key of the form's record source:

Dim lngCurrCust As Long

lngCurrCust = Me.txtCustID
Me.Requery
With Me.RecordsetCloine
.FindFirst "[CustID] = " & lngCurrCust
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
 
Hi Klatuu,

Thank you for your response. Could I possibly put that code Me.Requery in a
cmd button so any of the users can click it to update or is that not
recommended?

Thanks!!

Klatuu said:
I don't think Refresh will do it. I would suggest requerying the form each
time a new record is added. You may want to try Me.Requery in the form's
After Update event.

If you want to update the form's recordset periodically whether the user has
entered anything, you could do it with a timer event.

In either case, you will need to reposition the form to the current record.
The Requery repositions to the first record in the recordset. To reposition
to the current record, you will need code something like this. Assume CustID
is the primary key of the form's record source:

Dim lngCurrCust As Long

lngCurrCust = Me.txtCustID
Me.Requery
With Me.RecordsetCloine
.FindFirst "[CustID] = " & lngCurrCust
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
--
Dave Hargis, Microsoft Access MVP


Stockwell43 said:
Hello,

I have a database that currently has about 3000 records. There are about 8
users entering imformation through the day sometimes at once. As loans come
in, one person is entering the information but if everyone is in the
database, how are they able to see the new records being inputted? When they
click Add Record does that refresh the form they are looking at? Is there a
way for them to refresh the form? One person said when they tried to refresh,
it got stuck or froze on them using a refresh button. Any help or advice
would be greatly appreciated!!

Thank you!!
 
You could, however, there is no assurance the users will always remember to
click the button. If you put it in the current event, it would happen
automatically each time the record changes.
--
Dave Hargis, Microsoft Access MVP


Stockwell43 said:
Hi Klatuu,

Thank you for your response. Could I possibly put that code Me.Requery in a
cmd button so any of the users can click it to update or is that not
recommended?

Thanks!!

Klatuu said:
I don't think Refresh will do it. I would suggest requerying the form each
time a new record is added. You may want to try Me.Requery in the form's
After Update event.

If you want to update the form's recordset periodically whether the user has
entered anything, you could do it with a timer event.

In either case, you will need to reposition the form to the current record.
The Requery repositions to the first record in the recordset. To reposition
to the current record, you will need code something like this. Assume CustID
is the primary key of the form's record source:

Dim lngCurrCust As Long

lngCurrCust = Me.txtCustID
Me.Requery
With Me.RecordsetCloine
.FindFirst "[CustID] = " & lngCurrCust
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
--
Dave Hargis, Microsoft Access MVP


Stockwell43 said:
Hello,

I have a database that currently has about 3000 records. There are about 8
users entering imformation through the day sometimes at once. As loans come
in, one person is entering the information but if everyone is in the
database, how are they able to see the new records being inputted? When they
click Add Record does that refresh the form they are looking at? Is there a
way for them to refresh the form? One person said when they tried to refresh,
it got stuck or froze on them using a refresh button. Any help or advice
would be greatly appreciated!!

Thank you!!
 
Great! Thank you for your help and advice Klatuu!!

Klatuu said:
You could, however, there is no assurance the users will always remember to
click the button. If you put it in the current event, it would happen
automatically each time the record changes.
--
Dave Hargis, Microsoft Access MVP


Stockwell43 said:
Hi Klatuu,

Thank you for your response. Could I possibly put that code Me.Requery in a
cmd button so any of the users can click it to update or is that not
recommended?

Thanks!!

Klatuu said:
I don't think Refresh will do it. I would suggest requerying the form each
time a new record is added. You may want to try Me.Requery in the form's
After Update event.

If you want to update the form's recordset periodically whether the user has
entered anything, you could do it with a timer event.

In either case, you will need to reposition the form to the current record.
The Requery repositions to the first record in the recordset. To reposition
to the current record, you will need code something like this. Assume CustID
is the primary key of the form's record source:

Dim lngCurrCust As Long

lngCurrCust = Me.txtCustID
Me.Requery
With Me.RecordsetCloine
.FindFirst "[CustID] = " & lngCurrCust
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
--
Dave Hargis, Microsoft Access MVP


:

Hello,

I have a database that currently has about 3000 records. There are about 8
users entering imformation through the day sometimes at once. As loans come
in, one person is entering the information but if everyone is in the
database, how are they able to see the new records being inputted? When they
click Add Record does that refresh the form they are looking at? Is there a
way for them to refresh the form? One person said when they tried to refresh,
it got stuck or froze on them using a refresh button. Any help or advice
would be greatly appreciated!!

Thank you!!
 
Back
Top