>>>
>>>And EdMemo.prg draws a regular form with save and exit buttons, has a user-friendly header, gets positioned so that it doesn't hide the browsed record etc.
>>
>>For some reason, I need to 'change' the database Name.
>>But I wonder that all the view cannot be used even I use the database.dbc
>>and change all memo field value to new database name!!
>>So, I need to copy out the views SQL code and mark all view to delete.
>>Pack them and re-add the code again.
>>
>>As I have no time to study memo usage or function, I use macros for replacement.
>>
>>Change Memo macros will be like following:
>>{CTRL+PGDN}{CTRL+L}{ALT+L}{ALT+F4}{CTRL+F4}{DNARROW}
>>
>>That is: Open Memo window, Open Replace Window, Confirm Replace all,
>>Close Replace Window, Close Memo WIndow, Next record....
>
>>Then I just press the Function key with looping of above and all field change..
>>Of cos, I need to do first replace window setting, Replace all, Replace word, and other option.
>>
>
>Playing macros over an entire table is a sure way to slow down your machine. Why don't you write a simple form where you have a few controls like this:
>two textboxes to keep the search and replace value
>a listbox with all the available memos for the current table
>an editbox, read-only, to show the memo; it's .valid should set the ControlSource for the editbox
>a Go button to look for the next memo containing the search string
> * in .click
> Locate for thisform.txtSearch.value $ (thisform.lstMemo.value)
>Replace button where in .click you have
> lcMemo=thisform.lstMemo.value
> Replace (lcMemo) with strtran(eva(lcMemo), thisform.txtSearch.value, thisform.txtReplace.value)
> thisform.ebxMemo.refresh
> continue
>Exit button
>
>>Now I know it is a fool if I use a Company name as the database name.
>>I should use a general name to avoid unwanted change on database name...
>
>Keep it as a souvenir; when you sell this app to your customer's competition, you just change the table's long name & description in the .dbc, and keep the filename. Of course, take care you always show the long name only :)
Totally agree, as I have no time to study memo function such as memoline()...
So, I just make a simply method to do....
If possible, it would be using Scan..EndScan to make it fast.
Since I don't use any memo field in my databases. I just use 5 C(80) to carry
terms or remarks Because I need to give multiple choice to user to choose.
e.g. Terms_1 may be: a or b or c or a' ( little change from a) etc.
I use combox to give choice.
Well, your version will be highly reusable as I can do other replacement
will only simple change the controlsource and tablename! ^_^;
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.