I have an Access database where I display a form showing postcodes.
The requirement is to be able to type a partial postcode and see a list of postcodes beginning with those characters.
The form is driven by a query that gets its parameter from a text box on the form. At the moment I enter the partial postcode and press enter and the query gives me all the postcodes starting with those characters and that works fine.
What would be nicer for the user is as they type the postcode the list would match their characters and thus gradually reduce the number of postcodes shown.
I have got it to react to key presses and refine the list but after each character is typed I have to set the focus back to my input box. Setting the focus in VBA selects all the text in the box.
The problem I have is that I need to reposition the cursor to the end of the input box so that the user sees his postcode appear normally.
Has anybody any ideas on how I can do this, please?
Regards
Chris Bezant
The requirement is to be able to type a partial postcode and see a list of postcodes beginning with those characters.
The form is driven by a query that gets its parameter from a text box on the form. At the moment I enter the partial postcode and press enter and the query gives me all the postcodes starting with those characters and that works fine.
What would be nicer for the user is as they type the postcode the list would match their characters and thus gradually reduce the number of postcodes shown.
I have got it to react to key presses and refine the list but after each character is typed I have to set the focus back to my input box. Setting the focus in VBA selects all the text in the box.
The problem I have is that I need to reposition the cursor to the end of the input box so that the user sees his postcode appear normally.
Has anybody any ideas on how I can do this, please?
Regards
Chris Bezant