hi everyone
I have tow Textboxes on the form. Inside one sentence and the other is empty
How can I turn up Specified word to another ?
Something like the following code :
Case "Apple" = Orange
Case "Fish" = Cat
Thank you so much
hi everyone
I have tow Textboxes on the form. Inside one sentence and the other is empty
How can I turn up Specified word to another ?
Something like the following code :
Case "Apple" = Orange
Case "Fish" = Cat
Thank you so much
What are the rules for replacing one for the other?
I don't see a sentence, just single word.
Perhaps a table of the equivalents.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
How many "Cases" do you have? If only a few which don't change, you can hard code it.
If it's a lot, you can have a table that has "Apple" in one column and "Orange" in another.
Assuming that Apple is typed into the first textbox, do a DLookup to find the substitute word to put in the second textbox via the after_update event for the first textbox.
about 30 casesHow many "Cases" do you have? If only a few which don't change, you can hard code it.
If it's a lot, you can have a table that has "Apple" in one column and "Orange" in another.
Assuming that Apple is typed into the first textbox, do a DLookup to find the substitute word to put in the second textbox via the after_update event for the first textbox.
I think will need VBA along with a table of equivalents or else hard-coded in the VBA procedure.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Hard code example-
The on_Click event for the convert button:
Code:text2 = Text1 Text2 = Replace(Text2,"Fish","Cat") Text2 = Replace(Text2,"Apple","Orange") ...and so on
Last edited by davegri; 12-22-2017 at 10:33 PM. Reason: more
Unfortunately, it was not work . I think this method is for conversion only one
if the character conversion module is available, it also suffices
@zozzz,
Where does the data in the text box come from? Is it in a table?
If English is not you native language, you can use google translate to
a) write a description of what you are trying to in business terms (plain talk no database terms/jargon)
b) translate result to English and post it.
We need more info about your database and context to offer more focused responses.
Good luck.
zozz-v1.zip
This replicates your form Text1 and Text2 and does the conversion exactly if you enter the same example data into text1. Code is same as in post #7
If this doesn't meet your needs, explain further.
Thanks davegri
how can I use this in "public function Module" ?
zozz-v2.ziphow can I use this in "public function Module" ?
Like this. Includes new UDF (user defined function) in a new code module.
thankyou
Glad to make you happy! Good luck with the rest of your project.