Set Focus on Requery Propblem

S

Simon

I have a field witht he following code on a form.
The form requery every time to search for the closest mathc

Private Sub PostCodeSearch_Change()
On Error Resume Next

Me.Requery
Me!PostCodeSearch.SetFocus
Me!PostCodeSearch.SelStart = Len(Me.PostCodeSearch)

On Error GoTo 0
End Sub


Problem i have is it does not let me put a Space in the text field

How can i put in a space
 
W

Wayne-I-M

Maybe ???? you have a key press event

If KeyAscii = vbKeySpace Then
KeyAscii = 0
End If

Doubt it though unless you didn't write the DB
just an idea
 

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

Similar Threads


Top