PC Review


Reply
Thread Tools Rate Thread

Auto Create a unique number from user data, for input into table.

 
 
Andrew
Guest
Posts: n/a
 
      8th Feb 2010

Help would be appreciated, even if it cant be done
I have a table[InspectorsMaster] using Fields, ([DR_Date], (Short Date). A
number field (Long Integer [SeqNum])I do not currently use it, and a Field
([Employee], Text field, size set at 3). I would like to know if I could
generate a Unique sequential Value (starting with 0000) and combine it with
values from date, and text field that would automaticly be entered into the
Non used Number field such as on click . This of course would occure at The
Form level before close of the form. (Macro) or after dirty of the Date field.

Like:[Inspectors Master]![Employee] + DatePart(yy)[Insp_Mastr]![DR_Date],
plus the random number, if possible.
Respectfully,
AB
--
Andrew
H.W. Lochner
 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      8th Feb 2010
Andrew

If you already have values in all those fields (except sequence number), why
do you need to (re-)store the same values again, adding a sequence number?
(hint: you don't)

Instead, consider finding out how to generate sequence numbers (search
on-line for "custom autonumber"), then use a query to concatenate together
the fields you want displayed.

That way, you don't need to build yourself several more routines to
guarantee that a calculated sequence number in a field stays in sync with
all the pieces that make it up.

Besides, you're going to need to build that sequence number routine either
way!

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"Andrew" <(E-Mail Removed)> wrote in message
news:8A500A9A-3EDD-4F64-8768-(E-Mail Removed)...
>
> Help would be appreciated, even if it cant be done
> I have a table[InspectorsMaster] using Fields, ([DR_Date], (Short Date). A
> number field (Long Integer [SeqNum])I do not currently use it, and a Field
> ([Employee], Text field, size set at 3). I would like to know if I could
> generate a Unique sequential Value (starting with 0000) and combine it
> with
> values from date, and text field that would automaticly be entered into
> the
> Non used Number field such as on click . This of course would occure at
> The
> Form level before close of the form. (Macro) or after dirty of the Date
> field.
>
> Like:[Inspectors Master]![Employee] + DatePart(yy)[Insp_Mastr]![DR_Date],
> plus the random number, if possible.
> Respectfully,
> AB
> --
> Andrew
> H.W. Lochner



 
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
create a new table that pulls only unique values from a data table Isac Malmgren Microsoft Access Getting Started 2 2nd Oct 2009 09:24 PM
Write data to Access table with INSERT when table has auto number =?Utf-8?B?SG9raWV2YW5kYWw=?= Microsoft Excel Programming 1 20th Dec 2006 01:19 AM
automaticaly create a variable sized table from user input tigger@airband-radio.org.uk Microsoft Excel Misc 3 11th Sep 2004 07:43 PM
How to create a unique auto-number? Microsoft Access 6 16th Mar 2004 01:07 AM
Create a table from Form input data Malcolm Microsoft Access Forms 1 19th Dec 2003 05:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:51 PM.