Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Tue Nov 13 10:48:38 CST 2007
Mark: I'm not sure that will work because the space seems to be getting trimmed from the string before I get hold of it. I may have to use key trapping to see what key was pressed. And if blank add it manually to the string during the row source update. Regards, Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mark A Matte Sent: Tuesday, November 13, 2007 8:26 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Blanks in text box Rocky, It might be crude, but could you just force the string using something like (code below) on the BeforeUpdate of the text box? Thanks, Mark A. Matte CODE START Dim SpaceCheck Dim Length Dim TrimLength Dim FinalString FinalString = Me!Text0 Length = Len(Me!Text0.Text) TrimLength = Len(Trim(Me!Text0.Text)) If Length = TrimLength Then GoTo SKIP SpaceCheck = 0 Do Until SpaceCheck = Length FinalString = FinalString & Chr(32) SpaceCheck = Len(FinalString) Loop SKIP: MsgBox FinalString & "test" CODE END > Date: Tue, 13 Nov 2007 10:58:08 -0500 > From: fuller.artful at gmail.com > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Blanks in text box > > This does not strike me as surprising, since the same thing happens in > the database itself. You can't store "aaaa " in a column. Access will trim it. > So it's only natural that it would do the same for its form controls, > isn't it? > > A. > > On 11/13/07, Rocky Smolin at Beach Access Software > wrote: >> >> if I key in r and then a space the resulting filter is just an r. >> There are actually four text boxes like that which can add criteria >> to the row source of the list box. I do this four times adding Where >> clauses to the row >> source: >> >> > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com _________________________________________________________________ Windows Live Hotmail and Microsoft Office Outlook together at last. Get it now. http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL10062697 1033 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.15.30/1127 - Release Date: 11/12/2007 9:19 PM