jcolby at colbyconsulting.com
jcolby at colbyconsulting.com
Thu Jul 24 07:30:37 CDT 2003
David, I like your sig! John W. Colby www.colbyconsulting.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of David Fenton Sent: Wednesday, July 23, 2003 6:37 PM To: accessd at databaseadvisors.com Subject: [AccessD] RE: Displaying TAB as [Chr(9)] in a text control To John, Charles and Lambert Thank you all for your insights. It's good to discover 'why' things work as they do. Regarding the vbCRLF and vbTab - these constants are not recognised by Access inside a textbox so that's why I resorted to the chr(13) & chr(10). Progressing from there, I naturally thought that the chr(9) would work also, but now I know why it won't. I solved the problem by splitting the data and positioning two textboxes on the report at the correct tab distance apart, thus ensuring the data lined up properly. Thank you again for your advice. I enjoy reading many of the posts and have learned a great deal. Cheers David Ô¿Ô¬ Australia ------------------------------ Message: 14 Date: Wed, 23 Jul 2003 11:48:00 -0400 From: "Heenan, Lambert" <Lambert.Heenan at AIG.com> Subject: RE: [AccessD] Displaying TAB as [Chr(9)] in a text control To: "'Access Developers discussion and problem solving'" <accessd at databaseadvisors.com> Message-ID: <8B98F8EA48F8BA47A2F24E0D0AF40CF403897AF6 at xlivmbx12.aig.com> Content-Type: text/plain; charset="ISO-8859-1" As others have pointed out, the native Access textbox does not support tabs or other special characters. In your case you could try replacing Chr(9) with String(4," ") to get four (or whatever number you want) spaces inserted into the textbox. Lambert ------------------------------ Message: 18 Date: Wed, 23 Jul 2003 09:10:40 -0400 From: <jcolby at colbyconsulting.com> Subject: RE: [AccessD] Displaying TAB as [Chr(9)] in a text control To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Message-ID: <DCEFJAOENMNENLAAOFGPEEIEEHAA.jcolby at colbyconsulting.com> Content-Type: text/plain; charset="iso-8859-1" I can't help you directly with that however I do recommend that you replace the rather cryptic chr(x) with the constants (which are readable in English) vbCRLF, vbTab etc. Just better programming style. John W. Colby www.colbyconsulting.com ------------------------------ Message: 19 Date: Wed, 23 Jul 2003 08:27:42 -0500 From: "Wortz, Charles" <CWortz at tea.state.tx.us> Subject: RE: [AccessD] Displaying TAB as [Chr(9)] in a text control To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Message-ID: <D859A1A91D36184C8C28B77BF899C08609F878EB at ladybird.tea.state.tx.us> Content-Type: text/plain; charset="iso-8859-1" David, I think your problem is due to the fact that text fields within Access reports do not support tab settings. In the RTF document tab settings are recognized so during the formatting event the tab character acts as a formatting command that executes a macro that generates enough white space to get the next character to print at the position of the next tab stop. Since there are no tab stops within Access report text fields, the tab character is not treated as a formatting command but rather as an unprintable character. The vbCRLF is about the only formatting character that is recognized inside Access report text fields. I hope that answers your question as to why. Sorry, but I cannot give you an answer as to how to get around this. Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com]On Behalf Of David Fenton Sent: Wednesday, July 23, 2003 8:11 AM To: accessd at databaseadvisors.com Subject: [AccessD] Displaying TAB as [Chr(9)] in a text control Does anyone know what to do about the little square that appears when using TAB (ASCII 9) in a textbox on a report? If I direct the report to a RTF document the tab translates perfectly to a TAB as it is supposed to, but it will not do it on the report in its natural form. Below is the code I am using in the text control. ="Student No:" & Chr(9) & [StudID] & Chr(13) & Chr(10) & "Course: " & Chr(9) & IIf([CourseName] Is Null,[CRICOS_name],[CourseName]) Cheers David Ô¿Ô Australia _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com