Remove any Blank Space

access2010

Registered User.
Local time
Today, 14:12
Joined
Dec 26, 2009
Messages
1,172
Could I please receive a suggestion on how to remove any Blank Space Preceding the Symbol_Stock Code and the Stock_Name Entry?

Thank you.
Crystal
 

Attachments

use Update Query:

UPDATE Investments01_tbl SET Investments01_tbl.Symbol_Stock = Trim([symbol_stock]), Investments01_tbl.Stock_Name = Trim([stock_name]);
 
Check out the Trim() function. Can be used in an update query if you want to get rid of them in the table.
 
use Update Query:

UPDATE Investments01_tbl SET Investments01_tbl.Symbol_Stock = Trim([symbol_stock]), Investments01_tbl.Stock_Name = Trim([stock_name]);
Thank you for your suggestion, arnelgp.
We have been running an update query as you suggest, but would like to catch the problem at the time an entry is made.
Do you have a suggestion on how the space can be removed after the Cursor leaves the field?
Nicole
 
Check out the Trim() function. Can be used in an update query if you want to get rid of them in the table.
Thank you, pbaldy for your suggestion, but we would like to correct the error before the Cursor Leaves the field.
Could you please offer us a suggestion on how this could be done?
Nicole
 
There is such a thing as a control_LostFocus event in which you could add code to do the trim if the field isn't empty.

Simple-minded version:

Code:
Private Sub x_LostFocus()
X = Trim$(NZ(X,""))
End Sub
 
There is such a thing as a control_LostFocus event in which you could add code to do the trim if the field isn't empty.

Simple-minded version:

Code:
Private Sub x_LostFocus()
X = Trim$(NZ(X,""))
End Sub

The_Doc_Man,​

P.E..R.F.E.C.T.
Thank you
Nicole
 

Users who are viewing this thread

Back
Top Bottom