Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 232833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:03:02+00:00 2026-05-11T20:03:02+00:00

When working in Access, whenever I delete a record from one table – it’s

  • 0

When working in Access, whenever I delete a record from one table – it’s corresponding record in another table is also deleted when defined as a one-to-one relationship. This would be normal behavior when I tell it to enforce referential integrity with concerns to deletes and updates (how I understand it). However, it seems to also do it when I leave the enforce referential integrity option for deletes cleared, or when I leave the entire section on referential integrity cleared as well.

Basically, I have one table which is a list of suppliers that is a source for another database application that wasn’t written by myself. I am using this supplier table in my application, augmenting the information stored in the first program with information entered by the user in the second program in a separate table – but linked using a one-to-one relationship (relationship using primary keys in both tables).

I don’t want a delete of the secondary information record to result in the deletion of the data in the primary table – which would cause major issues (to put it mildly) in the first program. Is there a way to do this?

–Edited to add on 5/27/2009 @ 1600–

Here is the SQL script to create the Supplier_Master table from the first application:

USE [gtdata_test]
GO

/****** Object:  Table [dbo].[Supplier_Master]    Script Date: 05/27/2009 15:58:17 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Supplier_Master](
    [Supplier_Code] [nvarchar](50) NOT NULL,
    [Supplier_Master_Name] [nvarchar](50) NULL,
    [Salutation] [nvarchar](50) NULL,
    [Contact] [nvarchar](50) NULL,
    [Phone] [nvarchar](50) NULL,
    [Fax] [nvarchar](50) NULL,
    [EMail] [nvarchar](50) NULL,
    [Address] [nvarchar](50) NULL,
    [City] [nvarchar](50) NULL,
    [State] [nvarchar](50) NULL,
    [Zip] [nvarchar](50) NULL,
    [Country] [nvarchar](50) NULL,
    [Last_Review] [datetime] NULL,
    [Last_Rating] [datetime] NULL,
    [Last_Received] [datetime] NULL,
    [Last_Reject] [datetime] NULL,
    [Enabled] [int] NULL,
    [User1] [nvarchar](50) NULL,
    [User2] [nvarchar](50) NULL,
    [SupType] [nvarchar](50) NULL,
 CONSTRAINT [Supplier_Master$PrimaryKey] PRIMARY KEY CLUSTERED 
(
    [Supplier_Code] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$Address$disallow_zero_length] CHECK  ((len([Address])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$Address$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$City$disallow_zero_length] CHECK  ((len([City])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$City$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$Contact$disallow_zero_length] CHECK  ((len([Contact])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$Contact$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$Country$disallow_zero_length] CHECK  ((len([Country])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$Country$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$EMail$disallow_zero_length] CHECK  ((len([EMail])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$EMail$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$Fax$disallow_zero_length] CHECK  ((len([Fax])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$Fax$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$Phone$disallow_zero_length] CHECK  ((len([Phone])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$Phone$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$Salutation$disallow_zero_length] CHECK  ((len([Salutation])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$Salutation$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$State$disallow_zero_length] CHECK  ((len([State])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$State$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$Supplier_Code$disallow_zero_length] CHECK  ((len([Supplier_Code])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$Supplier_Code$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$Supplier_Master_Name$disallow_zero_length] CHECK  ((len([Supplier_Master_Name])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$Supplier_Master_Name$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$SupType$disallow_zero_length] CHECK  ((len([SupType])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$SupType$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$User1$disallow_zero_length] CHECK  ((len([User1])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$User1$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$User2$disallow_zero_length] CHECK  ((len([User2])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$User2$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master]  WITH NOCHECK ADD  CONSTRAINT [SSMA_CC$Supplier_Master$Zip$disallow_zero_length] CHECK  ((len([Zip])>(0)))
GO

ALTER TABLE [dbo].[Supplier_Master] CHECK CONSTRAINT [SSMA_CC$Supplier_Master$Zip$disallow_zero_length]
GO

ALTER TABLE [dbo].[Supplier_Master] ADD  DEFAULT ((0)) FOR [Enabled]
GO

Here is the SQL script to create the tblSupplierInfo table from the second application:

USE [instkeeper_test]
GO

/****** Object:  Table [dbo].[tblSupplierInfo]    Script Date: 05/27/2009 15:57:30 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[tblSupplierInfo](
    [strSupplierID] [nvarchar](50) NOT NULL,
    [bolSupAltShipAddyRep] [bit] NULL,
    [bolSupAltShipAddyCal] [bit] NULL,
    [bolSupInsistNet30] [bit] NULL,
    [bolRMARequireRepair] [bit] NULL,
    [bolRMARequireCalibration] [bit] NULL,
    [bolSupShipOrCourier] [bit] NULL,
    [bolSupRequireMSDS] [bit] NULL,
    [bolSupBlanketPO] [bit] NULL,
    [bolSupRequirePricing] [bit] NULL,
    [bolSupBlankPricing] [bit] NULL,
    [bolSupFaxPOSend] [bit] NULL,
    [bolAdditionalPaperworkRepair] [bit] NULL,
    [bolAdditionalPaperworkCalibration] [bit] NULL,
    [strRMARepairWordage] [nvarchar](100) NULL,
    [strRMACalibrationWordage] [nvarchar](100) NULL,
    [intBlanketPO] [int] NULL,
    [bolUseFedExNumber] [bit] NULL,
    [strFedExNumber] [nvarchar](150) NULL,
    [bolUseUPSNumber] [bit] NULL,
    [strUPSNumber] [nvarchar](150) NULL,
    [bolSupA2LAAccredited] [bit] NULL,
    [bolSupFreightAllow] [bit] NULL,
    [bolSupFreightOnly] [bit] NULL,
    [bolSupUseMiscNum] [bit] NULL,
    [strSupMiscFreightNum] [nvarchar](150) NULL,
 CONSTRAINT [tblSupplierInfo$PrimaryKey] PRIMARY KEY CLUSTERED 
(
    [strSupplierID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Supplier Name' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tblSupplierInfo', @level2type=N'COLUMN',@level2name=N'strSupplierID'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Alternate Shipping Address - Repairs?' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tblSupplierInfo', @level2type=N'COLUMN',@level2name=N'bolSupAltShipAddyRep'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Alternate Shipping Address - Calibrations?' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tblSupplierInfo', @level2type=N'COLUMN',@level2name=N'bolSupAltShipAddyCal'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Force Net 30 Wordage?' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tblSupplierInfo', @level2type=N'COLUMN',@level2name=N'bolSupInsistNet30'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Do repairs require RMAs?' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tblSupplierInfo', @level2type=N'COLUMN',@level2name=N'bolRMARequireRepair'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Do calibrations require RMAs?' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tblSupplierInfo', @level2type=N'COLUMN',@level2name=N'bolRMARequireCalibration'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Use Courier?' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tblSupplierInfo', @level2type=N'COLUMN',@level2name=N'bolSupShipOrCourier'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Requires MSDS(s)?' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'tblSupplierInfo', @level2type=N'COLUMN',@level2name=N'bolSupRequireMSDS'
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolSupAltShipAddyRep]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolSupAltShipAddyCal]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolSupInsistNet30]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolRMARequireRepair]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolRMARequireCalibration]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolSupShipOrCourier]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolSupRequireMSDS]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolSupBlanketPO]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((1)) FOR [bolSupRequirePricing]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolSupBlankPricing]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolSupFaxPOSend]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolAdditionalPaperworkRepair]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolAdditionalPaperworkCalibration]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ('RMA #') FOR [strRMARepairWordage]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ('RMA #') FOR [strRMACalibrationWordage]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [intBlanketPO]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolUseFedExNumber]
GO

ALTER TABLE [dbo].[tblSupplierInfo] ADD  DEFAULT ((0)) FOR [bolUseUPSNumber]
GO
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:03:02+00:00Added an answer on May 11, 2026 at 8:03 pm

    Yes it’s normal behaviour. If your form is based on a query that contains a single one-to-one relationship and you delete a “record” it will delete records in both tables.

    You need to suppress the normal delete process and run the delete manually via a custom button.

    Private Sub Form_Delete(Cancel As Integer)
    
      'this cancels all normal deletes'
      Cancel = True
    
    End Sub
    

    Then create a Delete button

    Private Sub cmdDelete_Click()
    
      Dim oDB as DAO.Database
    
      oDB.Execute "DELETE * FROM tblSupplierInfo WHERE strSupplierID = '" & Me.strSupplierID & "'", dbFailOnError
    
      Me.Requery
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 186k
  • Answers 186k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The solution is to have your blog accept_nested_attributes_for :comments. By… May 12, 2026 at 5:09 pm
  • Editorial Team
    Editorial Team added an answer Since you are modifying the item object, I don't see… May 12, 2026 at 5:09 pm
  • Editorial Team
    Editorial Team added an answer Everything is good, but I have one suggestion. If you… May 12, 2026 at 5:09 pm

Related Questions

When working in Access, whenever I delete a record from one table - it's
Using VB 6 and Access 2003 Code Dim db As Database, tbl As TableDef
Whenever I restrict anonymous access in my MVC site I get a 404 error:
Whenever I restore a backup of my database in SQL Server I am presented
I'm working on an application that serves up files (e-commerce downloadable content.) The content

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.