Ok, I know this should be easy..

  • Thread starter Thread starter Peter Lux
  • Start date Start date
P

Peter Lux

I've got tables in an existing db that I can export the definition for the
create in Access 2003. So, how come

xxx decimal(10,4) doesn't work? I've tried decimal (10,4), decimal [10,4],
number(10,4) and all of them don't work.

What's the deal?
 
I believe your question involves setting the format for a number. This is
done in the design window of the table. When you set up the field with data
type "number", you can go to properties and choose a field size, format, and
the number of decimal places for the respective field. Once you have that
set up correctly, you can import your numbers from the other database.
 
Hi Peter,

Welcome to use MSDN Managd Newsgroup!

From your descriptions, I understood you want to implement DECIMAL(10,4)
like we could in SQL Server. If I have misunderstood your concern, please
feel free to point it out. However, would you please explain how you "
export the definition "? Do I understand "existing db" as SQL Server
database generating SQL scripts correctly?

If you want to define format of column, you should use Custom Formats.
Custom number formats can have one to four sections with semicolons (;) as
the list separator. Each section contains the format specification for a
different type of number.

For your scenario, you may consider use the following format

#.0000;\-#.0000;"Zero";"Null"

And set Decimal Places to be Auto or 4

For more detailed information, please refer the articles below

Format Property - Number and Currency Data Types
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbaac10/htm
l/acproFormatNumber.asp

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!


Sincerely yours,

Michael Cheng
Microsoft Online Partner Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.

This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469
Others: https://partner.microsoft.com/US/technicalsupport/supportoverview/

If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
I don't think I gave you the whole picture. I have a create table sql script
in SqlBase that creates tables. I was trying to create the same table in
Access but the 'decimal' numeric fields were giving an error when I'd run
the 'build table' query. I think I found a way around it though:
Create the table with numeric fields as double, then go back in and switch
them to decimal(10,4). They can't be currency since the per units have to
have this much significance.

Thanks anyways..
 
Back
Top