Results 1 to 5 of 5
  1. #1
    burningman is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2014
    Posts
    3

    currency function in MS Access 2007 (correct syntax, etc.)

    i am using MS Access 2007, i am currently creating a table, and my SQL script is as follows: CREATE TABLE Rep (RepNum Char(2) PRIMARY KEY, LastName CHAR(15), FirstName CHAR(15), Commission Currency (7, 2) in the line "Commission Currency (7, 2)" i got a message that says "syntax error in CREATE TABLE statement." please help.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    I'd try dropping the (7,2)

    The CURRENCY data type

    The CURRENCY data type is used to store numeric data that contains up to 15 digits on the left side of the decimal point, and up to 4 digits on the right. It uses 8 bytes of memory for storage, and its only synonym is MONEY.
    The following CREATE TABLE statement shows the CURRENCY data type that can be used to create a table through the Access SQL View user interface or through the Jet OLE DB provider and ADO.



    CREATE TABLE tblCurrencyDataTypes (
    Field1_CURRENCY CURRENCY,
    Field2_MONEY MONEY)





  3. #3
    Xipooo's Avatar
    Xipooo is offline Sr. Database Developer
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    332
    Quote Originally Posted by orange View Post
    I'd try dropping the (7,2)
    this -----^

    You don't need to specify field size for a currency field.

  4. #4
    burningman is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2014
    Posts
    3
    Quote Originally Posted by orange View Post
    I'd try dropping the (7,2)
    got it! thanks a lot!

  5. #5
    burningman is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2014
    Posts
    3
    Quote Originally Posted by Xipooo View Post
    this -----^

    You don't need to specify field size for a currency field.
    got it! thanks a lot!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Correct Button Syntax
    By kelann in forum Programming
    Replies: 9
    Last Post: 11-09-2012, 09:00 AM
  2. Correct Syntax
    By bidbud68 in forum Programming
    Replies: 6
    Last Post: 10-19-2012, 01:09 AM
  3. Access 2007: Correct Data Type
    By netchie in forum Access
    Replies: 9
    Last Post: 02-16-2012, 07:09 PM
  4. SQL Correct Syntax
    By tbassngal in forum Queries
    Replies: 11
    Last Post: 09-01-2011, 01:55 PM
  5. What is the correct syntax for
    By giladweil in forum Access
    Replies: 1
    Last Post: 07-29-2010, 04:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums