Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How I can Insert a identity field in other table?

Status
Not open for further replies.

omauri

Programmer
Jan 24, 2001
12
0
0
CO
Good afternoon.

I want copy the identity identifier field from a table (TblEmple) to another one (TblTercero). I used this trigger:

Declare @IntCodigo as int

Select @IntCodigo = IdsEmpId
from inserted

insert into tbltercero (IntTerEmple)
values (@intCodigo)

This trigger functions, but I use a file (*.adp) in MS-Access 2000 with conection to Sql Server database. When I write a record in TblEmple table, Access doesn't show this record and show an uncomfortable MsgBox, but the record is copied to TblTercero table. I would like to MS-Access doesn't show this MsgBox. I know that is a identity field's problem.

Help me Please,
Thanks.
 
I'm having a little trouble with the wording here, so let me ask this:
Is tblTercero a SQL Server database table that has an identity on it? Tom Davis
tdavis@sark.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top