Subform Realtime Update from Search field

crawdad20

New member
Local time
Today, 10:18
Joined
Jun 19, 2003
Messages
5
Hello All,


I have a form/subform question. I have a mainform with a field that I want people to enter up to a 10 digit number (PO numbers), to find info in the subform (in datasheet view) in realtime, i.e. when I type "1" in the search field, my subform lists all the records with PO numbers that start with 1, then I type a 2 (resulting in "12" in the search field, showing all the POs that begin with 12).

What I am currently doing is basing the subform on a query, and I have 2 fields on the main form. The data entry field ("POSearch" - unbound) has the following code in the OnChange event:

Private Sub PONumSearch_Change()

Me.PONumTemp.Requery
Me.Refresh
Me.PONumSearch.SelStart = Me.PONumSearch.SelLength

End Sub


The second field is a non-visible list field ("PONumTemp") that is a list box of all my PO numbers in a table, that updates in realtime as I type in the PONumSearch field. I have thus based my subform query on the PONumTemp field with:

Like [forms]![frmPOInfo]![PONumTemp] & "*"

for the Criteria for my "PONum" field in the query.

I can get the hidden form to update in realtime, but my subform does nothing. Am I missing a step? I know this process worked in an access 97 DB and I am trying this in a 2000 DB.
 
Thanks Lister. It helped me figure out I had my subform query looking at the wrong field. For what I wanted to do, I needed the query to be looking at the Data Entry field, and I had it looking at the list box field. It's rockin' now!!!

I always appreciate the help!!


:D :p :D :p
 

Users who are viewing this thread

Back
Top Bottom