So, I have things to remember and things to learn. 10 years ago, my experience was with VFP 5 or 6.
Thank you so much for your assistance in rejuvenating old brain cells.they haven't all died! RE: displaying memo field contents OldtTimerDon (Programmer) Visual FoxPro articles, tips and downloads I know southern Arizona a bit, having been to the Phoenix / Tempe area a few times. To answer your question from the other thread, I am from Edinburgh, which is the capital of Scotland.
So, the routine I referred to will contain this line of code (assuming you are diplaying the data in question in an edit box, which seems the most obvious choice): The easiest way to do that is to call VFP's STRTRAN() function. In this case, one of those adjustments is to change the pipe character to a CHR(13) + CHR(10). It is in that routine where you handle any adjustments or translations you need to perform on the data being displayed. That routine would normally be a custom method of the form, although it might also be a function or a procedure. In general, if you are using a form to display the contents of a record, and if the form includes a way to navigate from one record to another, then you should ideally call a routine each time the record pointer changes. RE: displaying memo field contents Mike Lewis (Programmer) 17 Jun 13 03:45ĭon, just to add to the advice you've been given. Something like Thisform.mytext = translate(memofield), where translate is a function returning the translation result. However you do that, you should have your routine for it already. The latter would be the ideal place to trigger translation of the memo into the mytext property, eg translate |CPA|NY NJ|| into the multiline text Certified Public Accountant, New York and New Jersey, Expires. In the grid, there is the BeforeRowColChange and AfterRowColChange event. To bind to the form property you simply set the ntrolsource = "thisform.mytext" To create the form property use the "New Property" menu item from the Form menu. Instead of binding to a variable "mytext", I consider to bind to a form property, just because the variable scope would need to be public or private, and form properties are better suited for your case.
Are you at VFP6,7 perhaps? Or did you upgrade to 9, or are you using Fox2.6?įirst of all you can display multiline text in a textbox, when binding to a char field or variable, but even though you do that, you should rather use an editbox. You didn't specify yet, what version of FoxPro you are now using. RE: displaying memo field contents GriffMG (Programmer) 17 Jun 13 01:17 Seems to me that as I move the pointer in the database, I need a do command (set focus?) that activates the parsing routine and displays the record in a textbox. Retired for 10 years, I have been away from Foxpro too many years to resolve mt problem. My objective is that as the user moves through the database, a text box will display the contents of the variable named mytext. Note: The memo field that contains this data looks like this: |CPA|NY NJ|| (Substitute chr(10+chr(13) for each comma so that each is on a separate line.)
Sample of myText: Certified Public Accountant, New York and New Jersey, Expires. I have a routine that reads the record into a variable "myText." The memo field requires translation after being parsed with alines. Example: When reading a record, I want to display the contents of that field in a text box. Two of the memo fields require parsing and translation.