Negative numbers

K

Karyl

I am using InfoPath 2003 and have a repeating table that includes a column
which will require negative number entries. Can I force the number field to
always recognize the number entered as a negative regardless whether the user
enters the number with a - or not?
 
S

Scott L. Heim [MSFT]

Hi Karyl,

You can add a "Rule" to the text box in the table as follows:

- Open your InfoPath solution in Design View
- Right-click on the text box in the Repeating Table and choose Properties
- On the Data tab click Rules
- Click Add
- Click the Set Condition button
- In the first box select the field we are working on
- In the second box select "Is greater than or equal to"
- In the third box select "Type a Number" and then enter 0
- Click OK
- Click Add Action
- From the Action box select Set a Field's Value
- Click the button next to Field, drill down through the groups to select
the field we are working on and click OK
- Click the button next to Value, drill down through the groups to select
the field we are working on, click OK but then also add the following: * -1
- Click OK to get back to your form
- Preview and test - if you enter a positive number > 0, it should now be
changed to a negative value!

I hope this helps...

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
K

Karyl

I'm emailing Mr Gates - This man needs a raise!!! Scott - It works
beautifully!! Thank you so much!
 
S

Scott L. Heim [MSFT]

Hi Karyl,

I am glad the information helped! :)

Take care,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top