Russ-
RoleName in your parameter makes no sense.
[Forms]![frmRoleList]![RolesCmbo] references the current value of the combo
box Bound Column. If that's RoleID, then that's all you need to use.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of ghsclass65
Sent: Tuesday, April 23, 2013 5:28 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] query criteria from open form
John,
SELECT tblRoleList.RoleID, Names.LastName, Names.FirstName, Names.Active,
tblAssignedRoles.[Yes-No]
FROM tblRoleList INNER JOIN ([Names] INNER JOIN tblAssignedRoles ON
Names.NameID = tblAssignedRoles.AssNameID) ON tblRoleList.RoleID =
tblAssignedRoles.AssRoleID
WHERE (((tblRoleList.RoleID)=[Forms]![frmRoleList]![RolesCmbo]![RoleName])
AND ((Names.Active)=Yes) AND ((tblAssignedRoles.[Yes-No])=Yes));
Russ
--- In MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> , John Viescas
<JohnV@...> wrote:
>
> What is the SQL of your query?
>
>
>
> John Viescas, Author
>
> Microsoft Access 2010 Inside Out
>
> Microsoft Access 2007 Inside Out
>
> Microsoft Access 2003 Inside Out
>
> Building Microsoft Access Applications
>
> SQL Queries for Mere Mortals
>
> http://www.viescas.com/
>
> (Paris, France)
>
>
>
>
>
>
>
> From: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
> [mailto:MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of ghsclass65
> Sent: Tuesday, April 23, 2013 4:58 PM
> To: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
> Subject: [MS_AccessPros] query criteria from open form
>
>
>
>
>
> I'm trying to set up a query that will get it's criteria from an open
form.
> I've set the query's criteria to the form's combo box and it's record ID,
> but when I run the query I get a dialog box "Enter Parameter Value". I
> thought the query would use the value from the record that was chosen in
the
> form. No?
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
[Non-text portions of this message have been removed]
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (5) |
Tidak ada komentar:
Posting Komentar