spalmateer
Registered User.
- Local time
- Today, 23:13
- Joined
- Dec 5, 2000
- Messages
- 46
Hi,
I have a search form where I enter criteria in a textbox and it limits the criteria of a query. The results are shown in the same form. I'm currently using the the following code to requery the the query after update on the textbox:
Private Sub txtLastName_AfterUpdate()
Me.frmSubSearch.Requery
End Sub
This code works fine, but only after I exit the box, thus after it updates. I'd like it to requery after every keypress in the textbox. Is this possible? I've tried entering the code on the key press event but its not working. I've also tried it with keypreview on and off. I don't know if its because its not updating after every keypress. The criteria of the query references the value in the textbox, not a table, so I would think it wouldn't have to update to work. The textbox is unbound. Can I force update after every keypress? Thanks in advance for any advice!
Scott
I have a search form where I enter criteria in a textbox and it limits the criteria of a query. The results are shown in the same form. I'm currently using the the following code to requery the the query after update on the textbox:
Private Sub txtLastName_AfterUpdate()
Me.frmSubSearch.Requery
End Sub
This code works fine, but only after I exit the box, thus after it updates. I'd like it to requery after every keypress in the textbox. Is this possible? I've tried entering the code on the key press event but its not working. I've also tried it with keypreview on and off. I don't know if its because its not updating after every keypress. The criteria of the query references the value in the textbox, not a table, so I would think it wouldn't have to update to work. The textbox is unbound. Can I force update after every keypress? Thanks in advance for any advice!
Scott