GW>Does anyone know how to get a Counter field to start with a value
GW>other than 1? I'm constantly building/refining an Access database
GW>for customer/client info, and we may end up someday having to merge
GW>batches of records from several different sources. I'm using a
GW>Counter field as a Record ID and primary key, so of course I'd like
GW>to be able to merge these batches of records without the Record IDs
GW>colliding.
GW>Any suggestions would be much appreciated.
Either you will have to do a lot of Query building and merge the data a
table at a time while making changes to the rest of the imported data on
the fly, while keeping track of counters and other unique fields, or
change the existing counter field to a long integer field and create a
routine that will automaticly generate a unique number as you add new
records. That way it wont matter if the data that you are merging has
the same number as the pre-exsisting data because the routine will
change the number of the imported fields automaticly. However, you will
still have to make changes to the imported data as it is imported
because of the new unique number being generated. I have a routine that
works in a simular way for generating sequencial part numbers. It uses
a DLOOKUP to scan through all of the records in one table looking for a
specific part number. If the part number is not found, the DLOOKUP
returns NULL which intern means that it is a good part number. This
way is a lot slower than a counter. Sorry, but there isn't any real
easy way to do it that I know of.
Don
* SLMR 2.1a * We all live in a yellow subroutine.
--- TAG 2.7c Standard
---------------
* Origin: Baron's Flying Service (1:2202/8)
|