requeary form after vba code

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
 
M

Michael

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top