Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Update a text field (number) incrementally

Update a text field (number) incrementally

Update a text field (number) incrementally

on a query, if you have a text field (imported so it will always be text) and you need to update it incrementally by one
how would you do the query?

I tried
Field: PermitNo
Table: My_ImportSpec
Update: CStr([My_ImportSpec]![PermitNo]+1)

I have 200+ rows to increment. I entered the next number is row 1 but want to automate the rest instead of having to type them in individually.

When I run the above, it says I can't update the rows because of a conversion error.

RE: Update a text field (number) incrementally

Are you suggesting the records have already been imported? Do your records have a field or fields that can be used to determine the numbering?

Apparently PermitNo is text which would need to be converted to numeric in order to +1.

Hook'D on Access
MS Access MVP

RE: Update a text field (number) incrementally

How about simply:
Update My_ImportSpec
Set PermitNo = PermitNo + 1

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close