#1
|
|||
|
|||
Display result in textbox based on the input of another textbox
Hi all, I am very new to VB.
I need to create a form in Word 2010, which requires a user to fill in the price of an item (similar to a purchase order). There are 2 text boxes, one which user enters the price of that item, whereas the other box displays an indicator depending on the price range user keys in. For instance, if user entered Price>1000, the indicator text box needs to show "A". If Price<700, then it shows "B", and Price<300, the display will be "C". I hope someone could help me with this. Please be concise. Thank you guys. |
#2
|
||||
|
||||
Do you mean something like the attached?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Hi macropod, thank you for your reply.
Unfortunately no. The document you provided merely allows me to type something. What I need is when you type something in a text box, an indicator will show in another text box depending on what you've keyed in (conditions). |
#4
|
||||
|
||||
Did you exit the formfield (eg by pressing the tab key)?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Ah, Now I see that? How did you do it?
|
#6
|
||||
|
||||
To see how, click Developer > Restrict Editing > Stop Protection.
Then click on the formfield and click Developer > Properties. You'll see that the fomrfield has a bookmark name and an option 'calculate on exit' that is checked. Then press Alt-F9 to expose the field code for the forumula field. That's all there is to it. Do note that, with such a document, you can only enter data in the formfields. If you want to be able to enter data elsewhere, you need to use Section breaks to differentiate the Sections that will/will not have the formfield protection. See attached. For an idea of what can be achieved with formula field coding, check out my Microsoft Word Field Maths Tutorial, at: http://windowssecrets.com/forums/sho...l=1#post320143 or http://www.gmayor.com/downloads.htm#Third_party
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to insert a hyperlink in activex textbox | Joe Patrick | Word VBA | 1 | 10-03-2011 06:03 AM |
textbox color issue | Dave Duncan | Word | 0 | 08-07-2011 10:38 AM |
Motion paths and shrinking textbox | Brin | PowerPoint | 0 | 01-12-2011 10:04 AM |
Textbox Template | t0m46 | Word | 0 | 09-07-2010 03:38 AM |
Creating Chart using VB textbox value | shyler82 | Word VBA | 0 | 03-12-2010 06:56 PM |