Results 1 to 6 of 6
  1. #1
    gm_lowery is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    13

    Changing Field definition within a query

    I need help figuring out how to change the autonumbers in my query to long values. There are currently two autonumber fields Series ID and Session ID and I want change Session ID into an integer. I have tried some of the coding examples but I keep getting errors saying that it is not formatted correctly could somebody please help.
    below is a picture of the design view with the one I want to change circled.

    Click image for larger version. 

Name:	access screenshot2.jpg 
Views:	10 
Size:	101.1 KB 
ID:	8999

    Attached Thumbnails Attached Thumbnails access screenshot2.jpg  

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    If the fields truly are set up as Autonumbers, by default, they should have been set up as Long Integers.
    Why do you want to change them?

  3. #3
    gm_lowery is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    13
    Because I am not allowed to have two autonumbers in a make table query.

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    What exactly are you trying to do (in relation to building a make table query)?
    What is the purpose of the "make table" query?
    The reason why I ask is because I often see people mistakenly think they need to write information back to a new table as opposed to just using a query.
    So if we understand what you are trying to accomplish, we may be able to make better suggestions.

  5. #5
    gm_lowery is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2012
    Posts
    13
    It is an archiving table. So basically i just have to archive this data that this query picks up.

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Instead of using a Make Table Query, I would recommend setting up the shell of the table the way you like, and then use an Append Query to write the data to it.
    You would set up these two fields as Long Integer fields in this new table, but NOT Autonumber fields. You cannot write anything to an Autonumber field since it is automatically assigned.

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

Similar Threads

  1. Replies: 3
    Last Post: 08-22-2012, 09:01 AM
  2. Definition Tables using a Query?
    By AccessMaccess in forum Access
    Replies: 5
    Last Post: 03-22-2011, 10:01 AM
  3. Need help in finding Macro definition
    By sdondeti in forum Access
    Replies: 11
    Last Post: 10-31-2009, 04:52 PM
  4. changing a records field value
    By tubar in forum Queries
    Replies: 3
    Last Post: 07-06-2009, 07:36 AM
  5. Criteria Definition
    By claing in forum Access
    Replies: 1
    Last Post: 12-19-2005, 07:46 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