473,769 Members | 5,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Resultant tables not allowed to have more than one autonumber field!

Hi:

I am combining two tables in a query, extracting some fields, and attempting to create a
new table. This process is way down the line form the original tables, and some of the
fields were auto number fields originally (yes I am using those for some system level
identification of records). I have no intention of giving the new table any auto number
fields of its own, but I am getting an objection from that system that "Resultant tables
not allowed to have more than one auto number field"

Can someone tell me how to get round this boulder in the path of progress?

Thanks

JOhn baker
Nov 12 '05 #1
2 25016
I t tested this, it should work for you also.

The datatype of the original source is being passed into the new table
being built. So, if you convert the datatype to Long (which is the
integer data type equiv. of the Auto Num field), it will cast the new
table's field as long, and avoid your problem.

In my test, using a table with an AutoNum field called AssignmentID, I
used this generated field in the query:
ID: CLng([AssignmentID])

In SQL, it's SELECT CLng([AssignmentID]) AS ID, (etc.) FROM ...

Good Luck,
Bruce Pick

John Baker wrote:
Hi:

I am combining two tables in a query, extracting some fields, and attempting to create a
new table. This process is way down the line form the original tables, and some of the
fields were auto number fields originally (yes I am using those for some system level
identification of records). I have no intention of giving the new table any auto number
fields of its own, but I am getting an objection from that system that "Resultant tables
not allowed to have more than one auto number field"

Can someone tell me how to get round this boulder in the path of progress?

Thanks

JOhn baker

Nov 12 '05 #2
Thanks
Bruce Pick <br********@com cast.net> wrote:
I t tested this, it should work for you also.

The datatype of the original source is being passed into the new table
being built. So, if you convert the datatype to Long (which is the
integer data type equiv. of the Auto Num field), it will cast the new
table's field as long, and avoid your problem.

In my test, using a table with an AutoNum field called AssignmentID, I
used this generated field in the query:
ID: CLng([AssignmentID])

In SQL, it's SELECT CLng([AssignmentID]) AS ID, (etc.) FROM ...

Good Luck,
Bruce Pick

John Baker wrote:
Hi:

I am combining two tables in a query, extracting some fields, and attempting to create a
new table. This process is way down the line form the original tables, and some of the
fields were auto number fields originally (yes I am using those for some system level
identification of records). I have no intention of giving the new table any auto number
fields of its own, but I am getting an objection from that system that "Resultant tables
not allowed to have more than one auto number field"

Can someone tell me how to get round this boulder in the path of progress?

Thanks

JOhn baker


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1227
by: Andy_HR | last post by:
1. question when i have custom autonumber field... like Nz(DMax("ClanID", "tblClanovi")+1 how can i make it try again if someone else pressed the save button and that namber is already taken,..?? this i need for let say multiple users running the frontend in access 2002/3 aplication and making invoices (invoice number is uniq number... and it should only be generated after presing a save and print button...) now i'm using this code but in...
1
1860
by: Knut B. | last post by:
I have a problem with a database of concerts, where I recently tried to change the existing database with some new rows/categories and some new names on a few of the existing ones. I have an id field that is "autonumber", and this has become my problem. The original database had listed 54 concerts, with unique ID's. Now, the ID autonumber section has started to count from 1 again, and I can't register anything new in the database because...
3
7898
by: ben.werdmuller | last post by:
Hi, Is there an easy way in ASP/VBscript to grab an autonumber (primary key) field just after an SQL insert? This is probably easy, but I'm stuck .. Cheers.
6
6234
by: HS1 | last post by:
Hello I have a table in Access Database. This table has a AutoNumber field. I use a DataGrid to show that table When I insert a new record in for this table using a DataGrid, there is a message that asks me to enter the value for this AutoNumber field. Why I have to do that? Could you please help
2
1513
by: chudson007 | last post by:
I have two tables I need to join but there are 2 fields which they could be joined on. Using the example Tablles, TableA and TableB below; TableA ID1 ID2 Qty 1 Null 4 2 A 5 Null B 6
1
3043
by: BMF | last post by:
Howdy, I am mainly a MySQL user but I have been playing with Access 07 a little bit recently. I created a database with 3 tables. Table ID --- userID -- AutoNumber UserInfo - userID (linked to ID.userID fname -- text lname -- text age -- number
2
2048
by: Richard Sherratt | last post by:
I've inherited a system that was designed by someone with no understanding of database design. From the logical design point of view, there is no logical design. The physical design is a nightmare. e.g. there are no relationships between tables and foreign keys appear to have been sprinkled at random like confetti. As an example, the Employer - Employee - Contract - Expense hierarchy has EmployerID in the Expense table. That's the...
7
3351
by: Qtip23 | last post by:
Hello Everyone, I have been searching for ways to prevent the autonumber field from increasing when a user decides he/she does not wish to enter a record. I searched Bytes and I think I saw something that alluded to setting up two distinct tables (let's call them Table B and Table C). Table B is the one with one field and the field name is the same as the Autonumber field of the host table in question (let's call it Table A). Then Table...
3
2705
by: Mihail | last post by:
Hello ! I have more related tables: T_1, T_2 .... T_k, T_k+1 .... T_n Every table has a primary key defined as AutoNumber. For k = 2 to n every table has a field defined as LookUp on T_k-1 primary key. In the test phase I make new records and I remove records so, the primary key (AutoNumber) loose the natural order: (i.e. start at 287 and the next number is 301). Question: Is there an easy way (from VBA) to restore the AutoNumber field...
0
10199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7393
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3551
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.