Results 1 to 5 of 5
  1. #1
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544

    Question Record Count

    I am importing a text file directly into a table. What I need is to fill in a "counter" field every time I load the file (I delete all out of table each time). If I use the Autonumber feature it picks up from where it left off last time ( filled in 1 - 10 first time and then 11-15 the second time). Any suggestions would be greatly appreciated. Thank you

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    after deleting all the records out, you can restart the autonumber at any number you want by using the MS method. some of it is adopted here: http://www.ajenterprisesonline.com/_...e=AutoNumStart

    allen browne also has a simpler method of doing it using data definition methods. for the above function, delete the data out before running it, if you choose that method.

  3. #3
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Thank you! I'll have to research when I have a little bit more time.

  4. #4
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Adam,
    I used your function and it is working beautifully. However, there is one issue I run into upon exiting of the function. I receive the run-time error message:

    "The action or method requires a Table Name argument."

    I'm new at calling functions and am sure I have something simple messed up. I did make sure the AutoNum field is not indexed. Below is the code that calls the function:

    Code:
    DoCmd.OpenFunction (AutoNumStart("tblBEACONGarnFile", "AutoNum", 1))
    Thanks again for your help.

  5. #5
    jgelpi16 is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Location
    Charlotte, NC
    Posts
    544
    Got it. Used "Call" instead of "DoCmd.OpenFunction". What is the difference?

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

Similar Threads

  1. Count in Forms
    By ErnieS in forum Forms
    Replies: 13
    Last Post: 05-21-2010, 12:51 PM
  2. Count of records
    By Aston in forum Access
    Replies: 2
    Last Post: 03-30-2010, 05:20 AM
  3. count with conditional
    By humpz in forum Reports
    Replies: 3
    Last Post: 08-02-2009, 08:11 AM
  4. remove record count
    By theITguy in forum Access
    Replies: 1
    Last Post: 03-06-2009, 06:22 PM
  5. Form Record Count
    By Texaine in forum Forms
    Replies: 0
    Last Post: 10-19-2006, 09:07 AM

Tags for this Thread

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