473,473 Members | 1,511 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Creating a one to one relationship

43 New Member
Hi,
I have a 'Client table' and a 'Credit Card table' that need to be seperated for security reasons but I am not sure how you set up the one to one relationship. I currently have the two Primary Key fields ('Client ID' and 'Cardnumber') linked together and this appears as a one-to-one relationship in the relationships table. However, I am not sure if this is correct as the cardnumber field will not let me change the properties e.g. input mask and data type for a credit card number and defaults to those of the clientID.

Am I doing something wrong? More details including field names can be included in necessary.

Many thanks in advance for any help

Edd
Mar 8 '07 #1
5 15468
NeoPa
32,556 Recognized Expert Moderator MVP
You would need a ClientID field (or equivalent) in both tables.
It would be PK in the 'Client Table' and FK in the 'Credit Card Table'.
Mar 9 '07 #2
MMcCarthy
14,534 Recognized Expert Moderator MVP
Edd

As NeoPa says the tables should be as follows:

tblClients
ClientID (Primary Key)
ClientName

tblCreditCards
CardNumber (Primary Key)
ClientID (Foreign key referencing the primary key of tblClients)

The relationship between these two tables is based on the ClientID. Now you need to do two things.
  1. In the tblCreditCards table, set the indexed property of the ClientID to Yes (No Duplicates). This will enforce a one to one relationship
  2. click on the relationship in the relationship and tick the referential integrity and cascade boxes.
Mary
Mar 10 '07 #3
xian2
43 New Member
Many thank to both NeoPa and Mary for your great advice.

You have been really helpful in the creation of my database and I will undoubtedly return for some more assistance - if you can put up with me that is!

All help is very much appreciated and this is a truly wonderful service.

Best wishes and I hope to be able to help people also in the near future.

Edd
Mar 11 '07 #4
MMcCarthy
14,534 Recognized Expert Moderator MVP
You're welcome.

Mary
Mar 11 '07 #5
NeoPa
32,556 Recognized Expert Moderator MVP
Many thank to both NeoPa and Mary for your great advice.

You have been really helpful in the creation of my database and I will undoubtedly return for some more assistance - if you can put up with me that is!

All help is very much appreciated and this is a truly wonderful service.

Best wishes and I hope to be able to help people also in the near future.

Edd
That's a great attitude.
We can never have too many experts.
Mar 11 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Brian S. Smith | last post by:
Hi gang, Please help. I've been through the Access help, searched the Web, and I can't seem to get a straight answer. As the Subject line suggests, I want to run a fairly simple VB/Access Sub...
4
by: Ronnie | last post by:
Ok let me just say first that I am a newbie in Access and I don't know much of SQL or VB programming. But I am trying to create this contact database using Access 97. I have created 2 tables,...
5
by: Mike Turco | last post by:
What is the difference between creating relationships in the front-end vs. the back-end database? I was trying to create a relationship in a database front-end and noticed that I could not check...
3
by: CAD Fiend | last post by:
Hello, I have a land development project that has a many-to-many relationship. I have ONE question regarding table structures, and ONE question on how to make a Form with two Subforms, below. ...
1
by: Kosmos | last post by:
Hi...I'm new but decided to take on learning access programming for my job and I'm having trouble building relations. Any help would be very appreciated! So here's the jist of the program...I...
1
by: MRW | last post by:
Hello! I'm trying to create a dataset with a relationship inside a class, so it can be used on multiple pages. If I create the dataset in the class and define the relationship in the page, it...
3
by: solargovind | last post by:
Hi, I am New to this forum. I need steps that i do in creating subform. In main form, i have one table fields like vendor,account,due amount,balance amount and Requisition_id which is...
10
by: Richard | last post by:
Hi folks, thanks for taking the time to read this (and hopefully point our where I'm going wrong). The scenario: I have a local Access2007 database which links in several read only mySql...
2
by: adwest | last post by:
Forgive me if this is a foolish question. I "play" in Access and have only created a few rather simple relational databases. My knowledge and experience is limited. I have no formal training, just...
6
by: NicoleCartrette | last post by:
Going back to school is easier said than done.. This was posted to an older thread earlier but I don't think it got any attention. Your help is appreciated Professor requires we create a...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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,...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.