How to populate sequential numbers in a field using SQL or VBA?



Hi,

Is there a way to populate sequential numbers in a field using SQL or
VBA? If yes, how?

Assume the following is my existing table:

Fruit ID
Apply
Banana
..
..
Orange

and I want to populate the ID field with 100, 101, 102.....

(I do not want to use append query with autonumber field.)

Excel 009

.



Relevant Pages

  • Re: Exporting/Editing Risks
    ... I do have a basic SQL and VBA knowledge; however, ... > 2) Create a view in the Project database that shows all risks and includes ... > 3) in any version of Excel read the view into a sheet. ...
    (microsoft.public.project)
  • Re: Use MS Query in VBA to only get a SQL statement
    ... Excel macro keeps running while the query grid is showing, ... how you would capture the sql. ... > Access database under VBA control, where you could bring up a new ...
    (microsoft.public.excel.programming)
  • Re: Excel VBA - MS Query
    ... I just muddle through VBA and SQL on a "must do" basis. ... I bring data from Access into an Excel worksheet for statisitcal ...
    (microsoft.public.office.developer.vba)
  • Re: Handling Empty Strings in Query
    ... I tried the Nzfunction and the SQL worked great when I ran it from ... but failed when I ran the VBA (from Excel). ... Where do I find the field property to allow nulls? ...
    (microsoft.public.access.queries)
  • VBA usign predefined SQL over SQL server database
    ... New Database Query) from Excel VBA ... I need to run the query from the macro attached to a button in Excel as I ... do I have to define the SQL etc from scratch in VBA? ...
    (microsoft.public.excel.programming)