A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Relationship



 
 
Thread Tools Display Modes
  #1  
Old February 11th, 2005, 03:01 PM
storm warden
external usenet poster
 
Posts: n/a
Default Relationship

Is it possable to set up a relationship between two different tables.

Requests
REQIMEI (15 digit serial number)
Custoemr Name

Handsets
Manufacturer
Model
Prefix (6 digit prefix)

What i would like to do is to stetup a form whreby the handst model is
displayed each time an IMEI is entered. I have set up a dlookup function but
it only shows the mdoel when the form is closed then re-opened

Some help would be appreciated

Thanks
  #2  
Old February 11th, 2005, 03:30 PM
external usenet poster
 
Posts: n/a
Default

hi,
it is to my understanding that you have to have a common
field to define a relationship like an index id or unique
identifier. you don't have a common filed in either table.
read up on relationships in help.

-----Original Message-----
Is it possable to set up a relationship between two

different tables.

Requests
REQIMEI (15 digit serial number)
Custoemr Name

Handsets
Manufacturer
Model
Prefix (6 digit prefix)

What i would like to do is to stetup a form whreby the

handst model is
displayed each time an IMEI is entered. I have set up a

dlookup function but
it only shows the mdoel when the form is closed then re-

opened

Some help would be appreciated

Thanks
.

  #3  
Old February 11th, 2005, 03:51 PM
storm warden
external usenet poster
 
Posts: n/a
Default


With ieach IMEI being entered onto the database being unique i have set
REQimei as a primary key. In the Prefix List table i have also made the
prefix the primary key.
as each prefix is unique.
A relationship would work normally however witht the IMEI being 15 digits
and the prefix only being 6 (or the 1st 6 digits of the IMEI).

Te database is to be used for the
" wrote:

hi,
it is to my understanding that you have to have a common
field to define a relationship like an index id or unique
identifier. you don't have a common filed in either table.
read up on relationships in help.

-----Original Message-----
Is it possable to set up a relationship between two

different tables.

Requests
REQIMEI (15 digit serial number)
Custoemr Name

Handsets
Manufacturer
Model
Prefix (6 digit prefix)

What i would like to do is to stetup a form whreby the

handst model is
displayed each time an IMEI is entered. I have set up a

dlookup function but
it only shows the mdoel when the form is closed then re-

opened

Some help would be appreciated

Thanks
.


  #4  
Old February 11th, 2005, 05:58 PM
onedaywhen
external usenet poster
 
Posts: n/a
Default


storm warden wrote:
A relationship would work normally however witht the IMEI being 15

digits
and the prefix only being 6 (or the 1st 6 digits of the IMEI).


You can create a JOIN using these criteria e.g.

SELECT * FROM Requests INNER JOIN Handsets
ON LEFT(Requests.REQIMEI,6) = Handsets.Prefix;

but not a FOREIGN KEY.

Jamie.

--

  #5  
Old February 11th, 2005, 06:49 PM
Tim Ferguson
external usenet poster
 
Posts: n/a
Default

=?Utf-8?B?c3Rvcm0gd2FyZGVu?=
wrote in :

Is it possable to set up a relationship between two different tables.

Requests
REQIMEI (15 digit serial number)
Customer Name

Handsets
Manufacturer
Model
Prefix (6 digit prefix)


It depends on the nature of the relationship. If each handset is the
subject of one request (but a request can address lots of handsets), then
you'll need to put the RequestNumber field in the Handets table. If each
request concerns one handset (but a handset can be requested lots of
times), then you'll need the HandsetID field in the Requests table.

I think you have already had some advice about storing the IMEI number
when it is made up of two parts, the 6-digit Prefix and the 9-digit
Remainder. Is there a reason you decided to take no notice of that?

HTH


Tim F

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting a foreign key relationship in SQL Stevio Running & Setting Up Queries 2 December 22nd, 2004 03:51 PM
Re-establishing a broken relationship David McKnight Database Design 2 December 1st, 2004 11:49 AM
Table Wizard Does Not Set Relationship if Foreign Key and Primary Key Name Do Not Match Exactly in Case. HDW Database Design 3 October 16th, 2004 03:42 AM
tables repeat in relationship window and will not stay deleted Marcy General Discussion 1 September 1st, 2004 10:40 PM
Setting dual relationship with tool connector Carlos Visio 0 May 20th, 2004 12:51 AM


All times are GMT +1. The time now is 04:40 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.