borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Need Cisco software.)Next Topic (Need a simple POP3 Server) New Topic New Poll Post Reply
AndreaVB Forum : Off-Topic : How to use and Inner Join in the Access Query Designer
Poster Message
ba1959nh
Level: Scholar

Registered: 10-05-2006
Posts: 39

icon How to use and Inner Join in the Access Query Designer

I am helping someone with an Access 2003 db.
She is trying to set up a query using the Access Query Wizard/Designer.
The query requires an INNER JOIN between tables.
I cannot figure out where to put the INNER JOIN parameter in the query designer which is used to design and execute queries INSIDE the Access User Environment (as opposed to VBA code or external db).

I am really hoping that someone can help with this.
She does not understand straight SQL queries and relies on Access's Query Builder/Wizard/Designer to set up her queries.
I figure if I can set up a few examples, it will be very helpful.
When I refer to the Access Query Builder/Wizard/Designer, I mean the screen in Access that shows the following components of a query:
Field:
Table:
Sort:
Show:
Criteria:
or:


I just need to know where/how to include an INNER JOIN clause.

Here is the SQL Query:

SELECT TransactionID, EventID
FROM TransactionHistory
INNER JOIN Events
ON TransactionHistory.EventID = Events.EventID


So I guess I am trying to map the SQL statement above to the Query Builder UI (screen fragment shown below):
Field: EventID
Table: TransactionHistory
Sort:
Show: [X]
Criteria:
or:


I appreciate any help that can be provided.
Thanks

18-09-2006 at 05:28 PM
View Profile Send Email to User Show All Posts | Quote Reply
GeoffS
Level: VB Lord


Registered: 29-09-2004
Posts: 536
icon Re: How to use and Inner Join in the Access Query Designer

Hi,
To make a join in the Query Designer, click on "EventID" in the "Events" Table and drag over to "EventID" in the "TransactionHistory" Table. A line will be drawn between the two tables linking the required fields. If you now change the designer view to show the actual SQL you will see that it matches your written SQL Statement. You can also do this in reverse, if you type the SQL Statement in the SQL view then change to the designer view you will see the line connecting the two fields has been added.
Hope that helps.


____________________________
multi-tasking - the ability to hang more than one app. at the same time.

19-09-2006 at 04:35 AM
View Profile Send Email to User Show All Posts | Quote Reply
ba1959nh
Level: Scholar

Registered: 10-05-2006
Posts: 39
icon Re: How to use and Inner Join in the Access Query Designer

-> GeoffS <-
That is great information.

I believe it is exactly what I need.
I now see the Designer generated code with the JOIN using the SQL View.
The Access Help was pretty useless (as expected).
Thank you so much.
Bill
---------------------------------------
I still don't feel like a big cheese
---------------------------------------

19-09-2006 at 04:10 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Off-Topic : How to use and Inner Join in the Access Query Designer
Previous Topic (Need Cisco software.)Next Topic (Need a simple POP3 Server) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder