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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

FROM and JOIN Problems



 
 
Thread Tools Display Modes
  #1  
Old May 13th, 2010, 10:42 AM posted to microsoft.public.access.queries
mat_splat
external usenet poster
 
Posts: 1
Default FROM and JOIN Problems

Probably basics to you guys but still having loads of trouble and would
appriciate any help.

I have a table "tblNames" consisting of [ID] [firstname] [surname] [email]
I have another table "Master" [ID] [Name] [email] [Notes] - there is a form
built from this table "Issues"


Field Master.Name combines tblNames Firstname & Surname fields This displays
in the master table as the full name.
I now want to complete the Master.Email field using the Master.Name field.
I have managed to do this in the "Issues" form by using Master.Name as the
control source for the Issues.Email combo-box and it works.
However this does not complete the Master.Email field in the "Master" table...

SO I was told to try

SELECT FirstName & " " & SurName As FullName, Email FROM Master JOIN
tblNames ON Master.Name = tblNames.ID

Returns: Syntax Error in FROM Clause... poss change to "....FROM tblNames
JOIN....? " No Good!

ok... so have got rid of FROM error by using

SELECT tblContact.ContactID, [firstname] & " " & [Surname] AS Assigned FROM
tblContact INNER JOIN tblContact ON tblFault.Assigned = tblContact.ContactID;

(NOTE: Have changed the Table Names issues - tblFault and tblNames -
tblContact)

NOW I get Syntax Error in JOIN Operation... really dont get this Please
Please Please Help

  #2  
Old May 13th, 2010, 12:03 PM posted to microsoft.public.access.queries
Ken Snell
external usenet poster
 
Posts: 177
Default FROM and JOIN Problems

You're using the same tblContacts table twice in your join, which I don't
think you want to do. From the ON clause, it appears that you want the
tblFault table to be used too:

SELECT tblContact.ContactID, [firstname] & " " & [Surname] AS Assigned FROM
tblContact INNER JOIN tblFault ON tblFault.Assigned = tblContact.ContactID;

--

Ken Snell
http://www.accessmvp.com/KDSnell/




"mat_splat" wrote in message
...
Probably basics to you guys but still having loads of trouble and would
appriciate any help.

I have a table "tblNames" consisting of [ID] [firstname] [surname] [email]
I have another table "Master" [ID] [Name] [email] [Notes] - there is a
form
built from this table "Issues"


Field Master.Name combines tblNames Firstname & Surname fields This
displays
in the master table as the full name.
I now want to complete the Master.Email field using the Master.Name field.
I have managed to do this in the "Issues" form by using Master.Name as the
control source for the Issues.Email combo-box and it works.
However this does not complete the Master.Email field in the "Master"
table...

SO I was told to try

SELECT FirstName & " " & SurName As FullName, Email FROM Master JOIN
tblNames ON Master.Name = tblNames.ID

Returns: Syntax Error in FROM Clause... poss change to "....FROM tblNames
JOIN....? " No Good!

ok... so have got rid of FROM error by using

SELECT tblContact.ContactID, [firstname] & " " & [Surname] AS Assigned
FROM
tblContact INNER JOIN tblContact ON tblFault.Assigned =
tblContact.ContactID;

(NOTE: Have changed the Table Names issues - tblFault and tblNames -
tblContact)

NOW I get Syntax Error in JOIN Operation... really dont get this Please
Please Please Help



 




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


All times are GMT +1. The time now is 08:10 AM.


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