Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


Windkyle

4 posts

Wannabe Geek


#31377 15-Mar-2009 23:16
Send private message

I have a database with:
Tables
Contacts {Name, Address, Phone Number, ID} etc
Jobs {Job Number, Name, Adress Phone Number, Job Description} etc

How do I create a JOB form where when I enter the name which is linked to the contacts and the address from that name comes up Automatically.

Create new topic
bitumen
10 posts

Wannabe Geek


  #201371 16-Mar-2009 09:20
Send private message

Tables
Contacts {Name, Address, Phone Number, ID} etc
Jobs {Job Number, Name, Address Phone Number, Job Description}

You need to add a relationship between the tables.
[Contacts] 1 or many [Jobs]
[Jobs] must have 1 [Contact]
(not going to deal with many to many possibility)

Hence:
Contacts {Name, Address, Phone Number, ID} etc
Jobs {Contact_ID, Job Number, Name, Address Phone Number, Job Description}

Contact_ID in the Jobs table is the foreign Key to the Contact table ID field

Sample query (not tested or checked)

Select [Contacts].[Address]
From [Contacts],[Jobs]
Where [Contacts].[ID]=[Jobs].[Contact_ID] And [Jobs].[Name] = input


Hope this helps


edit reason: formating

 
 
 

GoodSync. Easily back up and sync your files with GoodSync. Simple and secure file backup and synchronisation software will ensure that your files are never lost (affiliate link).
Ragnor
8196 posts

Uber Geek

Trusted

  #201419 16-Mar-2009 14:26
Send private message

I would imagine you will invariably have a situation where a contact has many jobs and a job can have more that one contact. 

For many to many relationships you just need a joining table like JobContact, eg:

  Contact [ContactID, Name, Address, PhoneNumber, WhenCreated, WhenModified, CreatedBy, ModifiedBy]

   Job [JobID, Name, Adress Phone Number, Job Description, WhenCreated, WhenModified, CreatedBy, ModifiedBy]

   JobContact [JobID, ContactID, WhenCreated, WhenModified, CreatedBy, ModifiedBy]

A couple of coding conventions that I normally stick to are: don't make table names pural, add some basic logging fields so you can at least tell who last modified it and who created it (Created/Modified).

bitumen
10 posts

Wannabe Geek


  #201422 16-Mar-2009 15:07
Send private message


Windkyle You seem to be learning many different technologies and languages and concepts,

I recomment you look at FunctionX website as they have alot (450mb) of tutorials that i think will assist you.

Good luck in the learning!



stevonz
397 posts

Ultimate Geek

Trusted

#201426 16-Mar-2009 15:17
Send private message

Also bytes.com  (formerly know as thescripts.com) is another forum with a wealth of information & quick/ friendly advice relating to MS Access/ Excel queries...




Cheers, Stevo

Windkyle

4 posts

Wannabe Geek


#201514 16-Mar-2009 22:14
Send private message

Yep definately trying to learn as much as possible. Ive recently started my own little PC repair business, im pretty good at Diagnosing problems with hardware and software. This is my website let my know what you guys think, and what do you think it would cost to build it. www.pcworld.co.nz. I really appreciate your guys help Cool

Create new topic





News and reviews »

New Suunto Run Available in Australia and New Zealand
Posted 13-May-2025 21:00


Cricut Maker 4 Review
Posted 12-May-2025 15:18


Dynabook Launches Ultra-Light Portégé Z40L-N Copilot+PC with Self-Replaceable Battery
Posted 8-May-2025 14:08


Shopify Sidekick Gets a Major Reasoning Upgrade, Plus Free Image Generation
Posted 8-May-2025 14:03


Microsoft Introduces New Surface Copilot+ PCs
Posted 8-May-2025 13:56


D-Link A/NZ launches DWR-933M 4G+ LTE Cat6 Wi-Fi 6 Mobile Hotspot
Posted 8-May-2025 13:49


Synology Expands DiskStation Lineup with DS1825+ and DS1525+
Posted 8-May-2025 13:44


JBL Releases Next Generation Flip 7 and Charge 6
Posted 8-May-2025 13:41


Arlo Unveils All-New PoE Adapter With Enhanced Connectivity
Posted 8-May-2025 13:36


Fujifilm Instax Mini 41 Review
Posted 2-May-2025 10:12


Synology DS925+ Review
Posted 23-Apr-2025 15:00


Synology Announces DiskStation DS925+ and DX525 Expansion Unit
Posted 23-Apr-2025 10:34


JBL Tour Pro 3 Review
Posted 22-Apr-2025 16:56


Samsung 9100 Pro NVMe SSD Review
Posted 11-Apr-2025 13:11


Motorola Announces New Mid-tier Phones moto g05 and g15
Posted 4-Apr-2025 00:00









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.







GoodSync is the easiest file sync and backup for Windows and Mac