Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

Query Design

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
faxo - 31 Jul 2006 20:14 GMT
Hi,
I have a very basic database with two tables for a sports club. First table
is called 'Swimming Table'. This contains 2 fields 'Name' and 'Address'. The
second table is 'Gym table'. This also contains 2 fields 'Name' and 'Address'.

I want to design a parameter query which will ask for a name. Basically I am
looking to see if the same name appears in both tables.

My parameter query is formed like this: Like [Enter suppliers name please:] &
"*"

How should I link the tables. And what else needs to be done in query design
to accomplish the result.

Thanks.
Jeff Boyce - 31 Jul 2006 20:28 GMT
Based on your description, you are working with a ... spreadsheet!  While
you might need to use separate worksheets for Swimming and Gym in Excel,
Access is a relational database, and designing your tables this way will
prove counter-productive.  As your post points out, you've already found one
of the ways this design doesn't work well.

If you have three tables like:

   tblPerson
       PersonID
       FirstName
       LastName
       StreetAddress
       ...

   tblActivity
       ActivityID
       Activity (this is your "Swimming", ...)

   trelPersonActivity
       PersonID
       ActivityID

you could use this to record each person a single time, then show which
Activity/Activities that person is connected to.

Why would you want to do this extra work?  Well, you've already found one
reason why, here's another ... right now you have only two activities.

Are you ready to re-design your tables, your queries, your forms, your
reports, your macros, and your code every time a new activity gets added?!
With the three table design I laid out, you could, instead, simply add one
new row to the tblActivity and use it, as needed, in that third table.

(and if you insist on using Access like a spreadsheet, look into UNION
queries ... this would give you a way to combine results from a query
against your Swim table and a second query against your Gym table...)

Good luck!

Jeff Boyce
Microsoft Office/Access MVP

> Hi,
> I have a very basic database with two tables for a sports club. First
[quoted text clipped - 17 lines]
>
> Thanks.
faxo - 31 Jul 2006 20:49 GMT
>Based on your description, you are working with a ... spreadsheet!  While
>you might need to use separate worksheets for Swimming and Gym in Excel,
[quoted text clipped - 44 lines]
>>
>> Thanks.

Thanks for the advice,

I'll try it out.

Thanks again!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.