A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Working with Auto-Incrementing field



 
 
Thread Tools Display Modes
  #1  
Old September 15th, 2005, 09:06 PM
quartz
external usenet poster
 
Posts: n/a
Default Working with Auto-Incrementing field

I am using Office 2003 on Windows XP.

Please note that the use of spreadsheets is per boss and user preference -
this is mandatory and beyond my control.

I have a table in which there is an auto-incrementing column that will be
used to generate a form number. Users will open a spreadsheet file that will
update this Access table with the user's network login ID - and then an
auto-incremented form number will be generated for the record.

I need to be able to retrieve that specific form number and place it into
the spreadsheet form, but with multiple users, I need to be sure of the
integrity of the form number. i.e. I can't just use MAX on the [FORM_NUMBER]
field because another user may have already generated another form. So how
can I tie a specific record to a form number?

How can I work around this issue? Thanks much for your input.
  #2  
Old September 16th, 2005, 03:43 PM
Carl Rapson
external usenet poster
 
Posts: n/a
Default

What method/code are you using to update the table with the user's ID? If
you're using DAO, you could use the recordset's .AddNew method, then fetch
the newly-generated form number by referencing that field in the recordset:

rs.AddNew
rs.Fields![user ID] = user_login_ID
new_form_number = rs.Fields![autonumber field]
rs.Update

I know something similar can be done with ADO, but I'm not familiar with the
procedure. Will this work for your situation?

Carl Rapson

"quartz" wrote in message
...
I am using Office 2003 on Windows XP.

Please note that the use of spreadsheets is per boss and user preference -
this is mandatory and beyond my control.

I have a table in which there is an auto-incrementing column that will be
used to generate a form number. Users will open a spreadsheet file that
will
update this Access table with the user's network login ID - and then an
auto-incremented form number will be generated for the record.

I need to be able to retrieve that specific form number and place it into
the spreadsheet form, but with multiple users, I need to be sure of the
integrity of the form number. i.e. I can't just use MAX on the
[FORM_NUMBER]
field because another user may have already generated another form. So how
can I tie a specific record to a form number?

How can I work around this issue? Thanks much for your input.



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form, Subform, Tab key 2nd_Stage_User Using Forms 17 August 25th, 2006 12:30 AM
New Auto Number field needs to take place of old number field Scott B Database Design 2 June 29th, 2005 03:27 PM
Save field value for auto insertion into new record field Derek Setting Up & Running Reports 4 August 15th, 2004 08:31 AM
NUMBERING the pages Bob New Users 7 June 14th, 2004 12:20 AM
auto number field in a table Database Design 2 May 25th, 2004 05:51 PM


All times are GMT +1. The time now is 09:24 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.