By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,143 Members | 1,854 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,143 IT Pros & Developers. It's quick & easy.

Help with formating memo fld for correct output in form

P: 1
Hello,
I am somewhat new to Access and vba, but am trying to complete a request that has been made of me. Access version 2002 WindowsXP.

At this point these text boxes are bound to the table memo field. I have located Stephen Lebans code to limit enter of text field based on characters entered and code to limit text based upon width of a text box (this seems to be most applicable for single line text box). I am have trouble putting everything together.

The objective is: to have a single page report with in which the field size will not shrink or grow and the report page will not shrink or grow to that the specific fields on the report will appear in the same position regardless of amount data entered. The data entry must be restricted at the form level so that the report will appear correctly. The report should also appear as formatted was it was entered in the form (without lines that have wrapped from the line above).

Where I have run into problems is that when I entered text in the form and then ran the report the lines in the report are not wrapping the same as the lines in the form. Both the form and the report are formatted to Verdana 10 pt. and I have played with sizing the width of the field on the form and the report; however, a line in the form which was not wrapping in the form was wrapping in the report field. This could potentially cause the data in the report to be truncated as well messes up the needed format.

In Stephen Leban's database to limit characters the limit is based upon the number entered within the Limit sample form. Is it possible to determine what this number of characters should be through code. The len function will not account for variable character sizes in font.

Is this just too much of a word processing function and I should not expect to be able to do in Access?

I hope that I have explained my dilemma clearly. Any assistance is greatly appreciated.
Jan 23 '07 #1
Share this Question
Share on Google+
3 Replies


nico5038
Expert 2.5K+
P: 3,072
The calculation of the length of proportional fonts is a crime.
The easy way out is to use a non-proportional font like courier and that will make the Len() function use possible.

Another workaround could be to change the form into report layour and print the form for that specific record..
Just size the form to the paper format, make the background white and use for the "Show when" property of buttons and other form features "Form only".

Nic;o).
Jan 23 '07 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
Hello,
I am somewhat new to Access and vba, but am trying to complete a request that has been made of me. Access version 2002 WindowsXP.

At this point these text boxes are bound to the table memo field. I have located Stephen Lebans code to limit enter of text field based on characters entered and code to limit text based upon width of a text box (this seems to be most applicable for single line text box). I am have trouble putting everything together.

The objective is: to have a single page report with in which the field size will not shrink or grow and the report page will not shrink or grow to that the specific fields on the report will appear in the same position regardless of amount data entered. The data entry must be restricted at the form level so that the report will appear correctly. The report should also appear as formatted was it was entered in the form (without lines that have wrapped from the line above).

Where I have run into problems is that when I entered text in the form and then ran the report the lines in the report are not wrapping the same as the lines in the form. Both the form and the report are formatted to Verdana 10 pt. and I have played with sizing the width of the field on the form and the report; however, a line in the form which was not wrapping in the form was wrapping in the report field. This could potentially cause the data in the report to be truncated as well messes up the needed format.

In Stephen Leban's database to limit characters the limit is based upon the number entered within the Limit sample form. Is it possible to determine what this number of characters should be through code. The len function will not account for variable character sizes in font.

Is this just too much of a word processing function and I should not expect to be able to do in Access?

I hope that I have explained my dilemma clearly. Any assistance is greatly appreciated.
The problem is that Access for some reason treats the character spacing in forms differently to how it treats it in reports.

The only workaround I can think of is to impose a VbLf (line feed) after a certain number of characters are entered. However, I think this would require the text to be entered to a buffer before being saved to a record. Don't think this will work with Lebans Code.

You would have to set a character limit for the field. Set a line character number limit and use code to piece it all together.

Mary
Jan 23 '07 #3

NeoPa
Expert Mod 15k+
P: 31,660
I'm not sure, but I think the way it handles character spacing is dependant on the device driver itself (or at least the device settings/parameters). The screen and each different printer can be considered as different devices and so each may treat character spacing differently :(
Jan 23 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.