PC Review


Reply
Thread Tools Rate Thread

Creating an AutoNumber ID as a primary key

 
 
Stephan Leduc
Guest
Posts: n/a
 
      21st Sep 2008
I'm creating a user form where it will push data to an Excel spreadsheet. I
will later link this spreadsheet to MS Access to do some reports.

I need to create a function where for each new line added to a the
spreadsheet, I need to create a unique ID (the row name will be "ID") a
little bit like the AutoNumber in Access.

Thanks in advance for the help.

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      21st Sep 2008
AutoId = Application.Max(Activesheet.Columns(1)) + 1

--
__________________________________
HTH

Bob

"Stephan Leduc" <(E-Mail Removed)> wrote in message
news48AD15A-453E-4FBE-88A2-(E-Mail Removed)...
> I'm creating a user form where it will push data to an Excel spreadsheet.
> I
> will later link this spreadsheet to MS Access to do some reports.
>
> I need to create a function where for each new line added to a the
> spreadsheet, I need to create a unique ID (the row name will be "ID") a
> little bit like the AutoNumber in Access.
>
> Thanks in advance for the help.
>



 
Reply With Quote
 
Stephan Leduc
Guest
Posts: n/a
 
      21st Sep 2008
You are Fantastic Bob.

Thanks

Regards

Stephan

"Bob Phillips" wrote:

> AutoId = Application.Max(Activesheet.Columns(1)) + 1
>
> --
> __________________________________
> HTH
>
> Bob
>
> "Stephan Leduc" <(E-Mail Removed)> wrote in message
> news48AD15A-453E-4FBE-88A2-(E-Mail Removed)...
> > I'm creating a user form where it will push data to an Excel spreadsheet.
> > I
> > will later link this spreadsheet to MS Access to do some reports.
> >
> > I need to create a function where for each new line added to a the
> > spreadsheet, I need to create a unique ID (the row name will be "ID") a
> > little bit like the AutoNumber in Access.
> >
> > Thanks in advance for the help.
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autonumber primary key Annie Microsoft Access 4 16th Feb 2009 12:58 AM
Data Primary key vs. Artificial (Autonumber) primary key M. Microsoft Access Database Table Design 78 14th Dec 2007 09:10 AM
Autonumber Primary key value Nathan Carroll Microsoft ADO .NET 1 13th Sep 2004 08:29 PM
Primary Key Autonumber Microsoft Access Form Coding 4 16th Jun 2004 09:05 PM
Creating tables with autonumber/primary key Vsn Microsoft Access 4 24th Mar 2004 11:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:52 AM.