Update Sub Form Dataview on Keyup?

  • Thread starter Thread starter Barkster
  • Start date Start date
B

Barkster

I have a form with a couple of unbound fields that I want to use to
filter a subform/dataview on it by the value you type in the fields.
The query on the dataview uses Like
"*"+[Forms]![SearchForm]![Company]+"*" and I have on the company field
a keyup event to requery the subform below as
Forms!SearchForm!Datagrid.Requery. The subform is actually called
ContactSub but is named datagrid on the Main form. When I run the form
it will filter onload with whatever the previous value was but I cannot
get it to requery the dataview on keyup. Any ideas on what I'm doing
wrong. Thanks
 
I'm getting closer to tracking it down, on load the value is set for
the text field then as you type a new value in it the value remains the
old value. The textbox value isn't changing as you type. Onload it is
"Home" and if I erase and type a new value it is always "Home" when I
debug the value.

Private Sub Company_KeyUp(KeyCode As Integer, Shift As Integer)
Me.Datagrid.Form.Requery
MsgBox (Me.Company.Value)
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

Back
Top