If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Leading spaces
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. |
#2
|
|||
|
|||
Leading spaces
Sure, do an LTrim in the control's AfterUdate event. Something like:
Sub txtControlName_AfterUpdate() Me.txtControlName = LTrim(Me.txtControlName) End Sub -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Chris Emery" wrote in message ... 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. |
#3
|
|||
|
|||
Leading spaces
Thanks Arvin, works perfectly.
"Arvin Meyer [MVP]" wrote in message ... Sure, do an LTrim in the control's AfterUdate event. Something like: Sub txtControlName_AfterUpdate() Me.txtControlName = LTrim(Me.txtControlName) End Sub -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Chris Emery" wrote in message ... 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. |
Thread Tools | |
Display Modes | |
|
|