I have a SQL Server database as a back-end to an application built in Access. My description field is set to 50 and if the users key's in a 10 character description, the remaining become spaces. What would be the best way around this? I tried putting =RTrim([Description]) on my form, but it didn't work, so I'm thinking i need to do something on the SQL Server side. Any suggestions would be greately appreciated!
It is difficult to say for sure since we don't know whether the spaces comes from SQL server or from the client app (your Access app). However, a start is to verify that you have varchar or nvarchar, not char or nchar. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://sqlblog.com/blogs/tibor_karaszi "Sash" wrote in message news:4DF23C0B-E0A4-42E2-8205-6A4ED6AD5200@microsoft.com... >I have a SQL Server database as a back-end to an application built in Access. > My description field is set to 50 and if the users key's in a 10 character > description, the remaining become spaces. What would be the best way around > this? I tried putting =RTrim([Description]) on my form, but it didn't work, > so I'm thinking i need to do something on the SQL Server side. > > Any suggestions would be greately appreciated!
My ignorance. It the field was a char. Changed to varchar and it's perfect! "Tibor Karaszi" wrote: > It is difficult to say for sure since we don't know whether the spaces comes from SQL server or from > the client app (your Access app). However, a start is to verify that you have varchar or nvarchar, > not char or nchar. > > -- > Tibor Karaszi, SQL Server MVP > http://www.karaszi.com/sqlserver/default.asp > http://sqlblog.com/blogs/tibor_karaszi > > > "Sash" wrote in message > news:4DF23C0B-E0A4-42E2-8205-6A4ED6AD5200@microsoft.com... > >I have a SQL Server database as a back-end to an application built in Access. > > My description field is set to 50 and if the users key's in a 10 character > > description, the remaining become spaces. What would be the best way around > > this? I tried putting =RTrim([Description]) on my form, but it didn't work, > > so I'm thinking i need to do something on the SQL Server side. > > > > Any suggestions would be greately appreciated! > > >