Leading spaces

  • Thread starter Thread starter Chris Emery
  • Start date Start date
C

Chris Emery

What is a good way to prevent leading spaces being entered in a name? I
know I can do a LTrim update query afterwards but I thought there might be
an easier way at the data entry form stage.

Chris in Canberra, Australia.
 
Sure, do an LTrim in the control's AfterUdate event. Something like:

Sub txtControlName_AfterUpdate()
Me.txtControlName = LTrim(Me.txtControlName)
End Sub
 

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

Back
Top