requery form

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

Guest

I tried looking for something similar on the site but could not find it.

My problem is when I add a client on one form I can not see the client on a
different form unless I close it and reopen it. I have tried doing requery
on the got focus event but it didn't help.

Thanks

Lori
 
Before you open the other form run the code
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

To save the records you just entered
 
Neither of these worked. I did the refresh in the GotFocus event and the
docmd in the lost focus event.

Still no new record.
 
Could this have something to do with the how I find the record. Here is the
code that is used to find the client.

Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[ClientID] = '" & Me![cmbClientID] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
 
Lori,
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
needs to be in on the form (where you enter new data), maybe on the
afterUpdate event
 
This doesn't work either. It doesn't make much sense to me for the other
form to have an effect on the edit form. The new record is in the table it
just doesn't show on the edit client form unless I close and reopen.

It seems I just need the form to run the underlying query again but I can't
find a way to do it.
 
Lori,
1 thing I forgot to mention is you'll also need to requery the control in
your first form's activate event.
 
Back
Top