Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cant format a text box?

Status
Not open for further replies.

jjme88

Programmer
Dec 28, 2007
58
0
0
GB
HI I have a strange eror wherby i can control the format of numbers on some text boxes.

I have an access adp file that is linked to data from a sq server stored proc, but number i want to display as percentages in the format 45.32% aprear as 45.321456768631 as an exampe no mattter what set the prperties too on the form control.

any ideas anyone??
 
Where are you displaying the number? In a form? In a report?
If it's a text box, take a minute and look at user-defined formats in Access help.

"Before you criticize someone, you should walk a mile in their shoes.
That way, when you criticize them, you're a mile away and you have their shoes."
 
o sorry in a text box assigned to a form ive tried using the FOrmat property and decimal places but they seem to be ignored...??
 
take a minute and look at user-defined formats in Access help

Not the format property, user-defined formats. Such as Format(yournumber,"##.##%")

Now,
take a minute and look at user-defined formats in Access help


"Before you criticize someone, you should walk a mile in their shoes.
That way, when you criticize them, you're a mile away and you have their shoes."
 
hi the user defined formats works grate accept once i turn my project into an ade file and install it on a pc using access 2003 runtime all the fields have #Name? in them???

any ideas why that wont work.

Thanks,
 
#Name refers to a field name in your code that is either mis-spelled, or no longer exists in the new database.

"Before you criticize someone, you should walk a mile in their shoes.
That way, when you criticize them, you're a mile away and you have their shoes."
 
its the exact same database all i did was convert the file from an adp to an ade thats all thats changed and then put the file onto a pc that only has access run time. On a PC with full access version the text boxes are ok??

is this a problem with the run time??
 
Don't know much about the runtime version as I have never used it. I will venture a guess that the linked tables are no longer linked. Is the same DSN installed on the user PC?

"Before you criticize someone, you should walk a mile in their shoes.
That way, when you criticize them, you're a mile away and you have their shoes."
 
theres no linked tables its an ade file.. everything else works just fine. most frustrating.
 
I've come across a similar issue and it was one I didn't find a simple solution to. When running on my own PC, the text box would display the correct value. However, when distributed to other end users I was getting an error (probably #Name).

In the end, I replace the text box with a label, and put in an appropriate piece of VBA to 'calculate' and update the label caption.

OK, so it's a sledgehammer to crack a nut, but it did work.

 
theres no linked tables its an ade file

So where are the tables in the adp that you made the ade from? If you're not linked via ODBC to another RDBMS, then why aren't you using an mdb/mde?

"Before you criticize someone, you should walk a mile in their shoes.
That way, when you criticize them, you're a mile away and you have their shoes."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top