Y
yen
How to do queries with all issues with Company name?
How to do queries with all issues with Company name?
yen said:I download Access 2003 "Issues Database" template from
http://office.microsoft.com/en-us/templates/CT101426031033.aspx
It has "Search Issues" Form for All open issues But I want to create "Search
Issues" for "all issues" with search by Company name instead of "Assigned By"
or "Opened By". I'm very appreciate your help.
I download Access 2003 "Issues Database" template from
http://office.microsoft.com/en-us/templates/CT101426031033.aspx
It has "Search Issues" Form for All open issues But I want to create "Search
Issues" for "all issues" with search by Company name instead of "Assigned By"
or "Opened By". I'm very appreciate your help.
Larry Daugherty said:John, You said that so much better than I did!
Larry & John:
Thanks for reply and very appreciate that you're trying to help me but I'm
new to Access and just self study basic of Access database last quarter. I
don't have enough technical knowledge of this downloaded database. I don't
even know how they added Contacts_Opened By and Contacts_Assigned By in Open
Issues Queries. I thought this is MS forum and MS T/S could help. Do you
know how can I get help with MS T/S?
John W. Vinson said:Larry & John:
Thanks for reply and very appreciate that you're trying to help me but I'm
new to Access and just self study basic of Access database last quarter. I
don't have enough technical knowledge of this downloaded database. I don't
even know how they added Contacts_Opened By and Contacts_Assigned By in Open
Issues Queries. I thought this is MS forum and MS T/S could help. Do you
know how can I get help with MS T/S?
Well... MS T/S is NOT free; you'll need to pay an incident charge. It's really
designed for reporting program bugs, not for tutorials in how to use the
program. You can get to them from Microsoft's website, if that's what you
want.
We'll be glad to help, free of charge. But it's a cooperative process! If
you'll help us, we'll help you, and we'll both benefit (and even lurkers
reading the newsgroups may pick up something).
If there is a Query named [Open Issues Queries] in the Issues database, open
the Query in design view. Select View... SQL. Copy and paste that SQL text to
a reply in this thread, and describe what it's doing that you don't want, or
not doing that you do want.
John W. Vinson [MVP]
Thank you John for being so kind. Here's SQL for Open Issue Queries.
----------------------------------------------------------------------------------------------
SELECT Issues.ID, Issues.Title, [Contacts_Assigned to].[First Name] & " " &
[Contacts_Assigned To].[Last Name] AS [Assigned To Name], [Contacts_Opened
By].[First Name] & " " & [Contacts_Opened By].[Last Name] AS [Opened By
Name], Issues.[Opened Date], Issues.Comment, Issues.[Due Date],
[Contacts_Opened By].[E-mail Address] AS [Opened By E-Mail],
[Contacts_Assigned To].[E-mail Address] AS [Assigned To E-Mail],
Issues.Status, Issues.Category, Issues.Priority, Issues.[Assigned To],
Issues.[Opened By]
FROM Contacts AS [Contacts_Opened By] INNER JOIN (Contacts AS
[Contacts_Assigned To] INNER JOIN Issues ON [Contacts_Assigned To].ID =
Issues.[Assigned To]) ON [Contacts_Opened By].ID = Issues.[Opened By]
WHERE (((Issues.Status)<>"Closed"));
-------------------------------------------------------------------------------------
And below's VB code for searching with "Opened by" or "Assigned To" from
Open issues Queries from Search issue Form.
question#1. I wonder how can I do search with Company name instead
question#2. If possible I like to do search with Company name with "All
issues" instead of just "open issues".
John W. Vinson said:Thank you John for being so kind. Here's SQL for Open Issue Queries.
----------------------------------------------------------------------------------------------
SELECT Issues.ID, Issues.Title, [Contacts_Assigned to].[First Name] & " " &
[Contacts_Assigned To].[Last Name] AS [Assigned To Name], [Contacts_Opened
By].[First Name] & " " & [Contacts_Opened By].[Last Name] AS [Opened By
Name], Issues.[Opened Date], Issues.Comment, Issues.[Due Date],
[Contacts_Opened By].[E-mail Address] AS [Opened By E-Mail],
[Contacts_Assigned To].[E-mail Address] AS [Assigned To E-Mail],
Issues.Status, Issues.Category, Issues.Priority, Issues.[Assigned To],
Issues.[Opened By]
FROM Contacts AS [Contacts_Opened By] INNER JOIN (Contacts AS
[Contacts_Assigned To] INNER JOIN Issues ON [Contacts_Assigned To].ID =
Issues.[Assigned To]) ON [Contacts_Opened By].ID = Issues.[Opened By]
WHERE (((Issues.Status)<>"Closed"));
-------------------------------------------------------------------------------------
And below's VB code for searching with "Opened by" or "Assigned To" from
Open issues Queries from Search issue Form.
question#1. I wonder how can I do search with Company name instead
Probably, but I don't know where in the database the Company name is stored.
It's not in this query. Is there a Companies table? If so how is it related to
the Issues table or the Contacts table?
question#2. If possible I like to do search with Company name with "All
issues" instead of just "open issues".
To include closed issues in the search, simply remove the portion
WHERE (((Issues.Status)<>"Closed"))
from the query above. I presume - well, guess - that the [Open Issue Query]
above is the Recordsource for your search form. If it's not, please post the
SQL of that query too.
John W. Vinson [MVP]
John,
Thanks so much for reply. There's only SQL for Open Issues which I already
posted. There are contacts and issues table. Company name is in Contacts
table. Looking at Open issues SQL. I don't know how they added
Contacts_Assigned To and Contacts_Opened By tables ... I guess I need another
Queries with Contacts_Company tables but couldn't figure out yet.
John W. Vinson said:Thank you John for being so kind. Here's SQL for Open Issue Queries.
----------------------------------------------------------------------------------------------
SELECT Issues.ID, Issues.Title, [Contacts_Assigned to].[First Name] & " " &
[Contacts_Assigned To].[Last Name] AS [Assigned To Name], [Contacts_Opened
By].[First Name] & " " & [Contacts_Opened By].[Last Name] AS [Opened By
Name], Issues.[Opened Date], Issues.Comment, Issues.[Due Date],
[Contacts_Opened By].[E-mail Address] AS [Opened By E-Mail],
[Contacts_Assigned To].[E-mail Address] AS [Assigned To E-Mail],
Issues.Status, Issues.Category, Issues.Priority, Issues.[Assigned To],
Issues.[Opened By]
FROM Contacts AS [Contacts_Opened By] INNER JOIN (Contacts AS
[Contacts_Assigned To] INNER JOIN Issues ON [Contacts_Assigned To].ID =
Issues.[Assigned To]) ON [Contacts_Opened By].ID = Issues.[Opened By]
WHERE (((Issues.Status)<>"Closed"));
-------------------------------------------------------------------------------------