Dumb Question number 5:Formatting

A

Adam Harding

I am looking to limit results on the form to 2 d.p. for currencyt but as my
form is linked to Access i can only seem to do this with an expression box.
My problem is that if i don't want to clutter up my form i hide the text box
they populated, which means i f they make a mistake they cannot go back and
change it. Anyone help as i am due to submit this for testing soon.

Cheers Adam
 
S

Scott L. Heim [MSFT]

Hi Adam,

Are you able to complete the following steps on one of the fields from your
Access table:

- Right-click on the field and choose Properties
- Click the Format button
- Select "Currency" as the format and choose "2" from the Decimal Places box

This should work for you...assuming the field in your Access table actually
stores a "numeric" value and not a "string" value.

Scott L. Heim
Microsoft Developer Support

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

Adam Harding

Tried selecting my table fields as number but the form still won't let me
click format, greys it out. What type of field should i have in access to
perform this as 'number' doesn't work. FYI Infopath calls the field
optional_int
 
S

Scott L. Heim [MSFT]

Hi Adam,

Would you mind performing a test? If you would, please create a new
InfoPath solution based on the "Orders" table in the Northwind sample
database. When complete, drag the Orders table from the "dataFields" to you
form and see if the "Format" button is available for, say, the Freight
field.

Thanks!

Scott L. Heim
Microsoft Developer Support

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

Adam Harding

Yes fine, but Infopath describes the number as Simple type but when i use
currency it recognises it as SimpleType also but DOES NOT let me Format. I
have just checked the setup of the Northwind table field Freight in Access
2003 and it is done as currency same a smine but doesn't work
 
S

Scott L. Heim [MSFT]

Hi Adam,

This is really odd - no matter what table I choose or if I choose a query
or even a query based on a linked ODBC table my "Format" button is always
available. I am not able to reproduce a scenario where this button becomes
grayed out.

By chance, do you have another computer to test this on? Has this always
been an issue or is this something that recently started? You have applied
SP1 - correct?

Scott L. Heim
Microsoft Developer Support

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

Adam Harding

This is using SP1.

No matter what TYPE i assign to the Access Fields I CANNOT see the format
button directly only on the expression boxes. I have treid Currency as in
Northwind Database left the D.P. on auto and still no joy, any other ideas?
 
S

Scott L. Heim [MSFT]

Hi Adam,

Since you can repro the behavior using Northwind (Orders) would you mind
providing me with the exact steps you are completing? Please don't leave
any steps out as I want to see if there are any differences between what
you are doing versus my sample.

Thanks...

Scott L. Heim
Microsoft Developer Support

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

Adam Harding

Design my tables in Access Design View giving them same type of fieldtype as
the Northwind DBase. Create a new form from Data connection. insert a
datafield from the database as a text box, go to click format and the format
button is greyed out even though i cannot see any difference between my form
and Northwind bizzarely if i create a new form and drag the datafield from
datasource the format button works so it is only on this form!! I am using
the same field on both the new form and the problem one and FORMAT works on
the new but not on the old. A Great deal of design has gone into the old
form so if i can save it i would like to.

Does it make any difference because it is in a repeating table? As that is
the only difference between my old form and the new one.
 
S

Scott L. Heim [MSFT]

Hi Adam,

OK - so that information helps! Since this is behavior only specific to one
particular View that is going to make this difficult to
isolate...especially when I have yet to find a way to get that button to
not be available!

What happens if you create a new View in your existing (problem) solution
and then copy and paste all the controls from the "problem" view to this
new view...does the Format button work on one of the fields?

Scott L. Heim
Microsoft Developer Support

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

Adam Harding

Just connected my form to a different data source and back again and it
works, remarkable. Please consider the case closed Scott and thank you very
much for your help.

Cheers Adam
 
S

Scott L. Heim [MSFT]

Hi Adam,

Wow...that is odd....but I am very happy to hear it is now working!

Thanks for your patience...

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