Set Focus on Requery Propblem

  • Thread starter Thread starter Simon
  • Start date Start date
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
 
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
 
Back
Top