requeary form after vba code

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I have a button that when clicked calls a sub that updates the record.
after the call statement I have a me.requeary statement but the form
does not update.

The other problem is I want to stay on the same record that I was on
when I clicked the button but I end up back and the begining of all
the records.

Any pointers would be helpful.

thank you
 
I figured out the first problem but am still looking for ideas for the
second.

I run my update code.
Requeary the form.
but then ideally I would be put back on the same record without a
filter.

Below I am trying to do it with a filter that is not working either.
the filter string works but and the filter is on but it does not find
the correct record until I switch to design view and back once.

Private Sub Command55_Click()
Dim str As String
str = Me.DealCODE
Call DbReadExcelAndUpdate(str)
Me.Requery
Me.Filter = "dealcode =""& str &"""
Me.FilterOn = True
End Sub
 
Back
Top