Table Structure and Linking (1 Viewer)

solnajeff

Registered User.
Local time
Today, 02:45
Joined
May 22, 2007
Messages
33
I am writing a database for use in a casino and am looking for some advice regarding the linking of tables.

Generally everything is fine apart from the creation of a query which returns duplicate values which I think is due to the way I have structured the data.

There are three linked tables, customers, daily win/loss data and games played. Customers and win/loss are linked on customer ID and win/loss and games played on record ID.

Entering and viewing data via form is fine and everything works well however the problem is to create a query that returns win/loss records that match specified criteria.

I am not sure if I need to take a different approach and incorporate the games played into the win/loss table.

Although I have a fair amount of experience with Excel and VBA I am new to Access and would appreciate your advice.

Many thanks

Jeff
 

CJ_London

Super Moderator
Staff member
Local time
Today, 00:45
Joined
Feb 19, 2013
Messages
16,618
The standard query 'profile' is

Code:
SELECT whateveryouwant 
FROM thistable INNER JOIN thattable ON thistable.somefield=thattable.someotherfield 
WHERE yetanotherfield=somethingorother
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 19:45
Joined
Feb 19, 2002
Messages
43,302
The QBE will help you build whatever queries you need. Start by selecting the tables you want to join. If you have created relationships using the Relationship window, Access will helpfully draw join lines between the tables. If not you can draw them your self by clicking on a column in one table and dragging to the column in the other table. If you miss, you can correct the column names in the popup. Then select the columns you need from each table that you want to appear in the recordset. Finally, put in the selection criteria. Depending on the complexity, I sometimes switch to SQL view to do this.

Without seeing your tables and having a more detailed explanation of what is required, that is as far as we can go.
 

solnajeff

Registered User.
Local time
Today, 02:45
Joined
May 22, 2007
Messages
33
hi

I apologize for the delay in replying, but have been out in the jungle with no internet for a few weeks. I will look at restructuring the table I think and take it from there.

Thanks to all for your advice.

Regards

Jeff
 

milkman2500

Registered User.
Local time
Yesterday, 16:45
Joined
Oct 21, 2012
Messages
45
If your queries are returning duplicate values, you can use the "unique" feature of a query.
 

Users who are viewing this thread

Top Bottom