Results 1 to 4 of 4
  1. #1
    deso is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2013
    Location
    brisbane, australia
    Posts
    23

    using calculated fields in a select query involving "INTO"

    Hi guys, I have what I thought was a simple problem that is driving me mad. I have a table which includes some calculated fields. The calculated fields are really new fields that become data for the table.



    I want to run a simple select query that selects records that occur in a particular geological formation (i.e. from the field GEO), and place it into a new table that contains only the records for that geological feature. I know my SELECT query SQL is correct, but it won't run because some fields are calculated fields.

    I tried copying the entire table into a new table, then tried copying the calculated fields into a new field (with the idea to delete the calculated fields so i could then run my select query), but the numbers round up. So I tried adding the new field, and while blank, changing the field size to double and with two decimal places then copying. The numbers still round up. The field is set to Number every time. So i tried copying the entire field, putting it in excel, getting rid of all formatting, made sure it was a simple number format, then copied it back into the access field....but the darn number still rounds up, even when I have set the field size to double and the decimal places to two, it keeps rounding up. Even if i just type a number in the new blank field, the number still rounds up. What am I doing wrong to prevent the number rounding up? Just to repeat - the new field is set to Number, field size is double and decimal place set to two.

    Is there anyway I can convert my calculated fields to a field that contains simple values, or copy that calculated field into a new field that contains simple values with the right decimal places, so I can use them in my select query?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    Are you using Access 2010? Your profile shows Access 2007. Access 2007 does not have calculated field type.

    I haven't used calculated fields yet. Will have to experiment later and see if I can replicate your issue.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    deso is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2013
    Location
    brisbane, australia
    Posts
    23
    Thanks for your help. I've actually figured it out, using excel....i wasn't correctly assigning field size prior to copy/paste.

    however, it would be good to know how to do queries with calculated fields as i had to make new fields and detele the calculated field, which probably isn't ideal.

    i upgraded to 2010 a few months back. I will update my profile.

    Cheers

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,895
    Do SELECT queries on tables with calculated fields same as any table. The issue may be with copying the record to another table. Why would you need to do that?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 12-28-2012, 02:54 PM
  2. Replies: 1
    Last Post: 10-08-2012, 09:01 AM
  3. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 AM
  4. Replies: 1
    Last Post: 04-25-2011, 12:36 PM
  5. ComboBox "Select" and "DLookUp"
    By witooldas in forum Forms
    Replies: 0
    Last Post: 03-23-2011, 03:31 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