There are no recorsd being returned when i run my parameter query.
SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate,
ProgramID, AssignedTo, Author, StatusDate,Subject,Notes
FROM tblDocTracking
WHERE (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID]));
I have frmProgramSelect open.
I am not sure what i am doing wrong. Can you help?
|
|
0
|
|
|
|
Reply
|
Utf
|
5/27/2010 8:05:33 PM |
|
Be sure the control ProgramID is out of focus, to be sure that the value you
keyed in has been "updated". If the control is not updated (committed),
its last committed value, probably a null, will be used by the query.
Vanderghast, Access MVP
"PleaseHelpMe" <PleaseHelpMe@discussions.microsoft.com> wrote in message
news:8CE604CD-3C0F-4DA4-B341-05246BC8CA75@microsoft.com...
> There are no recorsd being returned when i run my parameter query.
>
> SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate,
> ProgramID, AssignedTo, Author, StatusDate,Subject,Notes
> FROM tblDocTracking
> WHERE
> (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID]));
>
> I have frmProgramSelect open.
>
> I am not sure what i am doing wrong. Can you help?
|
|
0
|
|
|
|
Reply
|
vanderghast
|
5/27/2010 8:39:46 PM
|
|
Any chance that the ?combobox field in your expression ([ProgramID] doesn't
actually hold the ProgramID field?
Regards
Jeff Boyce
Microsoft Access MVP
--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.
Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.
You can thank the FTC of the USA for making this disclaimer
possible/necessary.
"PleaseHelpMe" <PleaseHelpMe@discussions.microsoft.com> wrote in message
news:8CE604CD-3C0F-4DA4-B341-05246BC8CA75@microsoft.com...
> There are no recorsd being returned when i run my parameter query.
>
> SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate,
> ProgramID, AssignedTo, Author, StatusDate,Subject,Notes
> FROM tblDocTracking
> WHERE
> (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID]));
>
> I have frmProgramSelect open.
>
> I am not sure what i am doing wrong. Can you help?
|
|
0
|
|
|
|
Reply
|
Jeff
|
5/27/2010 8:44:36 PM
|
|
Did you make a selection in the Combo before running the query?
If you want all records whereby you do not make a selection try using this --
SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate,
ProgramID, AssignedTo, Author, StatusDate,Subject,Notes
FROM tblDocTracking
WHERE tblDocTracking.ProgramID Like
IIF([forms]![frmProgramSelect]![ProgramID] Is Null, "*",
[forms]![frmProgramSelect]![ProgramID]);
--
Build a little, test a little.
"PleaseHelpMe" wrote:
> There are no recorsd being returned when i run my parameter query.
>
> SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate,
> ProgramID, AssignedTo, Author, StatusDate,Subject,Notes
> FROM tblDocTracking
> WHERE (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID]));
>
> I have frmProgramSelect open.
>
> I am not sure what i am doing wrong. Can you help?
|
|
0
|
|
|
|
Reply
|
Utf
|
5/27/2010 10:35:01 PM
|
|
Another way (copied from John Spencer post) --
SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate,
ProgramID, AssignedTo, Author, StatusDate,Subject,Notes
FROM tblDocTracking
WHERE tblDocTracking.ProgramID Like
Nz([forms]![frmProgramSelect]![ProgramID], "*");
--
Build a little, test a little.
"PleaseHelpMe" wrote:
> There are no recorsd being returned when i run my parameter query.
>
> SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate,
> ProgramID, AssignedTo, Author, StatusDate,Subject,Notes
> FROM tblDocTracking
> WHERE (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID]));
>
> I have frmProgramSelect open.
>
> I am not sure what i am doing wrong. Can you help?
|
|
0
|
|
|
|
Reply
|
Utf
|
5/27/2010 10:50:03 PM
|
|
I would like to point out that this works if ProgramID is never null. Also
since you are using LIKE the assumption is that ProgramID is a text field,
although Access will automatically convert the value in the field to a string
in most cases.
John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
KARL DEWEY wrote:
> Another way (copied from John Spencer post) --
> SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate,
> ProgramID, AssignedTo, Author, StatusDate,Subject,Notes
> FROM tblDocTracking
> WHERE tblDocTracking.ProgramID Like
> Nz([forms]![frmProgramSelect]![ProgramID], "*");
>
|
|
0
|
|
|
|
Reply
|
John
|
5/28/2010 3:37:04 PM
|
|
I am so embarassed! I didnt actually name the combo box ProgramID! I renamed
and my original coding worked.
Thanks all and sorry for wasting your time!
"Jeff Boyce" wrote:
> Any chance that the ?combobox field in your expression ([ProgramID] doesn't
> actually hold the ProgramID field?
>
> Regards
>
> Jeff Boyce
> Microsoft Access MVP
>
> --
> Disclaimer: This author may have received products and services mentioned
> in this post. Mention and/or description of a product or service herein
> does not constitute endorsement thereof.
>
> Any code or pseudocode included in this post is offered "as is", with no
> guarantee as to suitability.
>
> You can thank the FTC of the USA for making this disclaimer
> possible/necessary.
>
> "PleaseHelpMe" <PleaseHelpMe@discussions.microsoft.com> wrote in message
> news:8CE604CD-3C0F-4DA4-B341-05246BC8CA75@microsoft.com...
> > There are no recorsd being returned when i run my parameter query.
> >
> > SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate,
> > ProgramID, AssignedTo, Author, StatusDate,Subject,Notes
> > FROM tblDocTracking
> > WHERE
> > (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID]));
> >
> > I have frmProgramSelect open.
> >
> > I am not sure what i am doing wrong. Can you help?
>
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
6/2/2010 10:09:38 PM
|
|
|
6 Replies
233 Views
(page loaded in 0.12 seconds)
Similiar Articles: Parameter query for a combo box row source - microsoft.public ...A query for a combo box on a form uses a value from a text box on the same form. Can I refer to the text box without specifying the form name? e.g. ... how can i create a parameters entry in query with list/combo box ...I am trying to create a query with parameter entry c/w list/combo box for the user to chose? But i can't. Pls help. Eg. [Enter the Stock Name] { I h... Use Multi-Select List Box as Query Parameter - microsoft.public ...My query has two criteria fields, one generated from a combo box and one generated from a ... Use Multi-Select List Box as Query Parameter - microsoft.public ... Using ... Parameter Query with List Box - microsoft.public.access.queries ...Parameter query for a combo box row source - microsoft.public ... how can i create a parameters entry in query with list/combo box ... Parameter query for a combo box row ... Query with parameters set to a List Box displaying multiple values ...I'm trying to set up a query with parameters set to a list box holding multiple values... I have set a query with its parameters displaying single values from a combo ... Pass field value selected in Combo Box to SQL Query - microsoft ...Parameter query for a combo box row source - microsoft.public ... Pass field value ... would you use/display the results of this select query? You're using a combo box on ... pass parameter value to query - microsoft.public.access.queries ...Pass field value selected in Combo Box to SQL Query - microsoft ... Parameter query for a combo box row source - microsoft.public ... Pass field value selected in Combo ... Parameter Input - microsoft.public.access.queriesI have a form that selects a client from a combo box. There is a sub-form ... that shows all my shipping info for a certain month or week. I am using a parameter query ... How to select query fields based on Combo box? - microsoft.public ...ACC2000: Base Combo Box on Parameter Query to Filter Values... basing the combo box on a parameter query ... query based on the Suppliers table to use as the row source ... Parameter queries and parameter queries - microsoft.public.access ...... least I know what I mean (I think) I have been doing some parameter queries with combo ... 2) Set up a query with the contacts and companies 3) In the query parameters box ... Using MS Access: A parameter query based on a combo box in a form ...shell function, procid, parameter query: You didn t bug me at all so don t worry about that. Its been a while since I used the DIR command like that. I couldn t find ... Customizing Access Parameter Queries - Martin Green's Office TipsThe basic input dialog box that appears when you run a parameter query simply asks the user ... for Null entries (when the user leaves the combo box empty). I'm using a ... How to Use an Access Form Combo Box Column as the Filter for a QueryHow to Use an Access Form Combo Box Column as the Filter for a Query. Combo boxes ... Parameter queries generate prompts when a query is run and a box appears with ... Parameter Query Using Combo Box DataBase - DataBase Discussion ...There are no recorsd being returned when i run my parameter query. SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate, ProgramID, Assign ACC2000: Base Combo Box on Parameter Query to Filter ValuesThis article shows you how to filter values that appear in a combo box by basing the combo box on a parameter query. Sometimes, you may want to limit the ... 7/20/2012 11:25:14 AM
|