RecordSets ... Not updating form (1 Viewer)

  • Thread starter Thread starter sureshsharda
  • Start date Start date
S

sureshsharda

Guest
I am using Recordset to update a field(not enabled in the form) in a table. Though Access allows me to update the table and results can be seen in the table I cannot see the results in the form immediately. When I exit the form and re enter the results of the update are visible. I am using the following code

Dim dbs As Database
Dim rst As Recordset
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("service chart", dbOpenDynaset)
With rst
.AddNew
!Caller_Id = max (max is a private varibale)

.Update
End With
Me.Refresh

Please Help
Thanks
sharda
 
Try a requery on your form
The refresh method only works on current data and is intended to update the current data to show any value changes. The requery method will requery your form (or report) and will pick up any new and changed data

Hope this helps
 
l have the same problem with my list box not showing the new information straight after l add records to the table and requery doesn't work either. Can anyone help.
email: soccer13@powerup.com.au
 

Users who are viewing this thread

Back
Top Bottom