Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-21-2013, 11:45 AM
stct stct is offline Form auto fill based on a different field value. Windows XP Form auto fill based on a different field value. Office 2003
Novice
Form auto fill based on a different field value.
 
Join Date: May 2011
Posts: 12
stct is on a distinguished road
Default Form auto fill based on a different field value.

Greetings!



I am trying to generate a form with multiple fields - with each field having different set of look up values.

I was trying to check, if it is possible to pre-populate field values, based on the value selected in the first field drop down.

For example: if Dept = HR, then following field values should be prepopulated
Code = 001, Location = Atlanta

if Dept = Finance, then
Code = 002, Location = Chicago

Lookup Values of Dept, Code and Locations will be predefined.

Please advise.

Thanks in advance...
Reply With Quote
  #2  
Old 03-21-2013, 11:15 PM
macropod's Avatar
macropod macropod is offline Form auto fill based on a different field value. Windows 7 64bit Form auto fill based on a different field value. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi stct,

See attached. The document uses a dropdown formfield for the predefined values, and formula fields for the variable output. If you unprotect the document and press Alt-F9, you'll be able to see the formula field contents. Note that you must exit the formfield (via the TAB key) after updating it for the conditional output to appear.
Attached Files
File Type: doc Formfields - DropDownDemo.doc (33.5 KB, 615 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-22-2013, 06:58 AM
stct stct is offline Form auto fill based on a different field value. Windows XP Form auto fill based on a different field value. Office 2003
Novice
Form auto fill based on a different field value.
 
Join Date: May 2011
Posts: 12
stct is on a distinguished road
Default

Hi Macropod,
Thank you for the prompt response. I think, the requirements are the same as depicted by you. Unfortunately, I am unable to see the dynamic value changing into Code and Location field, after changing the value in Dept (Dropdown1) field.

Any advise if I need to configure the word document setup? I do see the IF statement correctly. Just that, it is not populating with the values after protecting the document.

Please advise.

Thank you!

Quote:
Originally Posted by macropod View Post
Hi stct,

See attached. The document uses a dropdown formfield for the predefined values, and formula fields for the variable output. If you unprotect the document and press Alt-F9, you'll be able to see the formula field contents.
Reply With Quote
  #4  
Old 03-22-2013, 07:37 AM
macropod's Avatar
macropod macropod is offline Form auto fill based on a different field value. Windows 7 64bit Form auto fill based on a different field value. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi stct,

Did you exit the formfield (via the TAB key) after updating it?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 03-22-2013, 08:09 AM
stct stct is offline Form auto fill based on a different field value. Windows XP Form auto fill based on a different field value. Office 2003
Novice
Form auto fill based on a different field value.
 
Join Date: May 2011
Posts: 12
stct is on a distinguished road
Default

Yes, I think, I clicked on the blank space outside the form field areas to exit. Unfortunately, it did not execute the script due to some reason.

Please advise. Should I click anywhere else in the secondary field area?
Reply With Quote
  #6  
Old 03-22-2013, 08:17 AM
macropod's Avatar
macropod macropod is offline Form auto fill based on a different field value. Windows 7 64bit Form auto fill based on a different field value. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

After updating the dropdown, press the TAB key (with only one formfield, you can't actually click on anything else).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 03-22-2013, 08:25 AM
stct stct is offline Form auto fill based on a different field value. Windows XP Form auto fill based on a different field value. Office 2003
Novice
Form auto fill based on a different field value.
 
Join Date: May 2011
Posts: 12
stct is on a distinguished road
Default

Thank you Paul! This is perfect. I was wrongly clicking mouse somewhere in the white space instead of pressing TAB key.. With the TAB key, it worked exactly to what we were looking for...
Reply With Quote
  #8  
Old 09-10-2014, 12:04 PM
regwitt regwitt is offline Form auto fill based on a different field value. Windows 7 32bit Form auto fill based on a different field value. Office 2010 32bit
Novice
 
Join Date: Sep 2014
Location: Columbus, IN
Posts: 11
regwitt is on a distinguished road
Default

So I am attempting to duplicate this and I'm stuck.

APP1Supply = {IF{REF EngineType } = “CM2350” “J2-09”}{IF{REF EngineType }= “CM2150” “J2-27”}

This is what I have referencing a dropdown box called "EngineType"
with the choices CM2350 and CM2150. Trying to populate fields with either J2-09 or J2-27. When I protect the document the above "code" stays. I thing I need one more step in the instruction.

Thanks!
Reply With Quote
  #9  
Old 09-10-2014, 02:27 PM
macropod's Avatar
macropod macropod is offline Form auto fill based on a different field value. Windows 7 64bit Form auto fill based on a different field value. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That suggests either:
a) you have Word's field code display toggled 'on'; or
b) you have typed the field braces (i.e. { }).
For:
a) try pressing Alt-F9 to toggle the field code display; and
b) the field brace pairs (i.e. '{ }') are created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 09-11-2014, 05:06 AM
regwitt regwitt is offline Form auto fill based on a different field value. Windows 7 32bit Form auto fill based on a different field value. Office 2010 32bit
Novice
 
Join Date: Sep 2014
Location: Columbus, IN
Posts: 11
regwitt is on a distinguished road
Default Thanks!

I was able to get this to work perfectly. I need one more step. After the user chooses "EngineType" and the circuit connections "J2-09" are populated. Is it possible to bookmark these choices and use them throughout. The test procedure will ask the user to, "Open the circuit J2-09, Accelerator Pedal Position 1 Supply of the tester." and so on throughout. Is this even possible? If so would you mind showing/explaining an example?

Thanks!

“The only man who never makes mistakes is the man who never does anything."
-Theodore Roosevelt
Reply With Quote
  #11  
Old 09-11-2014, 05:58 AM
macropod's Avatar
macropod macropod is offline Form auto fill based on a different field value. Windows 7 64bit Form auto fill based on a different field value. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

There's numerous ways of doing this, including:
1. nest your existing fields thus:
{IF{REF EngineType}= "CM2350" "J2-09" {IF{REF EngineType}= "CM2150" "J2-27"}}
and bookmark them as a group. You can then insert cross-references to the bookmark wherever you like;
2. embed your existing fields in a QUOTE field, thus:
{QUOTE{IF{REF EngineType}= "CM2350" "J2-09" {IF{REF EngineType}= "CM2150" "J2-27"}}}
and bookmark it. You can then insert cross-references to the bookmark wherever you like;
3. embed your existing fields in a SET field, thus:
{SET EngineREF {IF{REF EngineType}= "CM2350" "J2-09" {IF{REF EngineType}= "CM2150" "J2-27"}}}
then insert cross-references to the EngineREF bookmark wherever you like; and
4. Simply repeat the existing fields wherever you want the output replicated.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #12  
Old 09-11-2014, 09:53 AM
regwitt regwitt is offline Form auto fill based on a different field value. Windows 7 32bit Form auto fill based on a different field value. Office 2010 32bit
Novice
 
Join Date: Sep 2014
Location: Columbus, IN
Posts: 11
regwitt is on a distinguished road
Default

Extremely helpful, Thanks!
Reply With Quote
  #13  
Old 09-16-2014, 07:41 AM
regwitt regwitt is offline Form auto fill based on a different field value. Windows 7 32bit Form auto fill based on a different field value. Office 2010 32bit
Novice
 
Join Date: Sep 2014
Location: Columbus, IN
Posts: 11
regwitt is on a distinguished road
Default

Hi Paul,

This is what I have.

Product ID: {FORMDROPDOWN} containing: Blank space, BDR and BDO.

C_EPD_Overspeed_Limit = {IF{REF ProductID}="BDR""2600 rpm"}

C_EPD_Overspeed_Error_Reset = {IF{REF ProductID}="BDR""2600 rpm"}

C_EPD_Overspeed_Allowed_Time =
{IF{REF ProductID}="BDR""2600 rpm"}

C_EPS_n_ASICOverspeedLimit = {IF{REF ProductID}="BDR""2600 rpm"}

C_EPS_n_ASICOverspeedReset = {IF{REF ProductID}="BDR""2600 rpm"}

T_DIP_Key_Switch_RLOC = {IF{REF ProductID}="BDR""2600 rpm"}

I bookmarked each of these:
C_EPD_Overspeed_Limit, C_EPD_Overspeed_Error_Reset, etc.....

Using the open loop engine speed control feature of the tester, set the engine speed such that _Engine_Speed = _____________

Here is where I want to add +10 and later on in the document I would like to -10, I also need it to clear. How would I go about this?

If this belongs somewhere else please excuse me and point me in the direction.....

Thanks!

Last edited by regwitt; 09-16-2014 at 12:32 PM.
Reply With Quote
  #14  
Old 09-16-2014, 03:34 PM
macropod's Avatar
macropod macropod is offline Form auto fill based on a different field value. Windows 7 64bit Form auto fill based on a different field value. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Given that all the fields are the same, why not just bookmark the first one, then insert cross-references to that one bookmark? You certainly don't need to bookmark every field. Indeed, you don't need to bookmark any of them if all you're going to do is replicate the formula field wherever you want the output repeated.

Now, suppose you bookmark just the first instance, with 'RPM' as the bookmark name. In that case, wherever you want the same results to appear, simply insert a cross-reference to the RPM bookmark. Done.

To output the RPM +/- 10, simply use another formula field, coded as:
{=RPM+10}
or:
{=RPM-10}
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #15  
Old 09-17-2014, 04:41 AM
regwitt regwitt is offline Form auto fill based on a different field value. Windows 7 32bit Form auto fill based on a different field value. Office 2010 32bit
Novice
 
Join Date: Sep 2014
Location: Columbus, IN
Posts: 11
regwitt is on a distinguished road
Default

Hi Paul,

I must apologize. My previous post was wrong. I tried to quickly get it submitted before I left for the day, copied and pasted forgetting to make the necessary changes.

This is what I have.

Product ID: {FORMDROPDOWN} containing: Blank space, BDR, BDO, etc. Roughly 25 different engine types.

C_EPD_Overspeed_Limit = {IF{REF ProductID}="BDR""2650 rpm"}

C_EPD_Overspeed_Error_Reset = {IF{REF ProductID}="BDR""2300 rpm"}

C_EPD_Overspeed_Allowed_Time = {IF{REF ProductID}="BDR""0.26 s"}

C_EPS_n_ASICOverspeedLimit = {IF{REF ProductID}="BDR""2750 rpm"}

C_EPS_n_ASICOverspeedReset = {IF{REF ProductID}="BDR""2290 rpm"}

T_DIP_Key_Switch_RLOC = {IF{REF ProductID}="BDR""240"}

I bookmarked each of these: C_EPD_Overspeed_Limit, C_EPD_Overspeed_Error_Reset, etc.....

Using the open loop engine speed control feature of the tester, set the engine speed such that _Engine_Speed = _____________.

I will need to change the time and change the rpm values according to the feature being tested within each separate engine type, so the math will change through out the procedure.

Here is where I want to add +10 and later on in the document I would like to -10, I also need it to clear. How would I go about this?

Thanks!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
MACRO - Insert row based on Form Field Criteria Elan05 Word VBA 5 04-16-2013 06:39 AM
Form auto fill based on a different field value. Nested if field that contains a fill-in field is not prompting for fill-in info Nccadm Mail Merge 2 04-02-2013 03:15 AM
Form file timesheet, auto fill date from calander jkeeney Word 1 03-21-2012 12:21 AM
Macro to populate a text form field based on dropdown selection koloa Word 0 10-20-2011 11:52 AM
Form auto fill based on a different field value. How can I fill in form I received in email that used underlines instead of text field Gail L. Word 2 05-17-2009 12:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft