Parameter Query Using Combo Box

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
Utf
5/27/2010 8:05:33 PM
access.queries 6343 articles. 1 followers. Follow

6 Replies
508 Views

Similar Articles

[PageSpeed] 15

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
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
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
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
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
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
Utf
6/2/2010 10:09:38 PM
Reply:

Similar Artilces:

using Query Based distribution groups between domains
I am trying to use query based DG's for passing world wide notificatons across domains. I have a global QBDG containing QBDG from our 3 child domains. When I am sendin an email to this DG the email only reach the recipients in the domain where the global dg is placed, none of the the recipients in the other child domains gets the email. When I do a preview on the global DG the child domain qbdg is visible so it looks as if it would work. Any ideas appreciated. Sounds like an issue with the expansion server. Have you considered setting the expansion server to try and work through t...

Crm 4 event log warnings. CRM Parameter Filter
Hi all, I am looking for a solution on the following issue. Any suggestions will be very welcomed! Thank you in advance. Background: We just upgraded MS Crm 3 to Crm 4 Question: Every time when a user tries to save an update of a record. A warning will be logged into Event Viewer --> Application. It happens to all entities. For example: 1. I am doing some updates on the contact form http://localhost:5555/CAMELOT-DEV/sfa/conts/edit.aspx?id={488FF696-4F8C-DE11-AC94-00505698306E}# 2. Click save 3. I will find a warning message in Event Viewer --> Application Exception information: ...

Compilator C++ freeware for commercial use
Is there a freeware compilator C++ for commercial use? On Tue, 22 May 2007 09:40:42 +0200, karol1208 <karol1208(Cut this)@gazeta.pl> wrote: >Is there a freeware compilator C++ for commercial use? Microsoft Visual C++ 2005 Express Edition? MrAsm GNU C++. joe On Tue, 22 May 2007 09:40:42 +0200, karol1208 <karol1208(Cut this)@gazeta.pl> wrote: >Is there a freeware compilator C++ for commercial use? Joseph M. Newcomer [MVP] email: newcomer@flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm I think, as MrAsm suggested, you can use th...

Changing the font size of a drop-down box content
I create a drop-down box in an Excel cell, using a list as the drop-down box content. When I then select the drop down box, the diplayed font size is tiny. How do I increase the font size? Take a look at this link from Debra Dalgleish's site http://www.contextures.com/xlDataVal08.html#Font "Ross Macadam" wrote: > I create a drop-down box in an Excel cell, using a list as the drop-down box > content. When I then select the drop down box, the diplayed font size is > tiny. How do I increase the font size? ...

Inserting Text Box within a Text Box
Version: 2008 Operating System: Mac OS X 10.4 (Tiger) Hello, <br><br>I am doing a newsletter (my own template) and would like to &quot;pull out&quot; a quotation. How do I get this smaller text box within the larger one and formatted so that the original text wraps around that box? <br><br>Thanks so much. You can't � Text Wrap is a property which affects only how the main text of the document flows around an object. It has no effect on text within objects. You can attempt it in a Publishing Layout document but still may not get the result you'r...

I can't query an XMLDocument with XPATH; every query returns 0 nodes
Please help! I'm using the following code to get an XML doc: string str = "http://api.local.yahoo.com/MapsService/V1/geocode?appid=12345&city=addison"; System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(str); request.Credentials = System.Net.CredentialCache.DefaultCredentials; System.Net.HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse(); System.IO.Stream inputStream = response.GetResponseStream(); System.X...

Using Document Hyperlinks in Email Publications
I thought I had read somewhere that you could use hyperlinks to documents in your email publications (where the documents are not saved on a web server). I was under the impression that the documents sort of "upload" and give the reader the option to "open" or "save" them. Is there a trick to doing this, if it is possible at all? Thanks You could "attach" the document to your email. In the body of the email give a statement, i.e., See attached file. Before sending the email, click on the Attach icon on the tool bar at the top which will give y...

String Too Long in Query
I have a complicated calculated field in a query, and the builder keeps truncating my expression. Is there any way around this limitation? If necessary, I can post the calculation - but the basics are a switch by the value of class, then a switch by value of position to get the correct payout for a car race. (so each class has the switch for position) Any help would be GREATLY appreciated! Meg On Mon, 11 Feb 2008 05:17:00 -0800, Meg <Meg@discussions.microsoft.com> wrote: >I have a complicated calculated field in a query, and the builder keeps >truncating my expression. Is...

SQL insert query help needed
Hi all I am new to SQL and i would to know if anyone can help me work around this problem: i have 2 tables table1 (column1, column2, column3, column4) where column1 = integer - auto increment, clumn2 = text, column3 = text , column 4 = integer and table2 (column1 , column2) where column1 = integer - auto increment and column2 = text Now table1.column4 is related to table2.column1 thats table1.column4 = table2. column1 what i was trying is to be have an SQL statement that can insert values that are not fixed maybe different every time but i want them to be added into ...

Crosstab Query
I have some data that I need to flatten by a particular field, but it is duping up to 7 times due to one field. Unfortunately, the value of these fields is different for each unique record, so a simple crosstab will not work. Here's an example Field to Flatten Duping Field XXX ABC XXX BCA XXX CAB YYY JDK YYY KJD If there were only two dupes per "field to flatten" i could use "FIRST" and "LAST" or "MI...

Count if between date parameters
I need create a formula that show how many patients were available to be seen on each day of the month. I would like to make the cut-off for changes of dates as 3pm, meaning that one day is from 3pm - 3pm the next day. e.g. - 12/30/09 available patients would be all those there from 3:01pm on 12/29/09 to 3:00pm on 12/30/09. If they're available for the full day count them only. Using this logic with the data below on 12/30/09 only 2 patients were available to be seen. Name Request DT Res DT P1 12/27/2009 1:26 12/31/2009 16:28 P2 12/27/2009 12:00 12/30/2009 7:20 P3 ...

Develop apps using VB2008 w/o admin privileges?
Hello all, I am getting started with VS2008, I just installed it on my work PC with Win XP SP2. I am; however, noticing that apparently I need local admin privileges to get any project started. Is this correct? Are any of you developing apps with VB 2008 who do not have admin privileges? I have Power User (PU) privileges at this time. Is there any way to put together an app using this product with only these (PU) privileges? Since I had to install another system app I was given temp admin privileges, so the VS 2008 install went well, but when I restarted Windows the next day to fi...

Query Parameter
I want to supply a parameter to a query to define the from date and to date and retrieve data falling under this from and to date. but, i do not want it to be prompted, as the same criteria is to be used in more than one table. so, i want to store the from date and o date in a temp table and related this to the date field in different tables. thanks You could create a table (tblDateRange) with 2 date fields (datStart and datEnd) and only one record. Then add tblDateRange to your query and don't join it. Set the criteria under your date field to: Between [datStart] and [datEnd] ...

Can a Vlookup be used when creating a chart
1. Is it possible? 2. where would it be entered? the values line? 1. Probably 2. Not enough detail to provide even a guess. Gord Dibben MS Excel MVP On Tue, 26 Jan 2010 11:23:02 -0800, Confusicous <Confusicous@discussions.microsoft.com> wrote: >1. Is it possible? >2. where would it be entered? the values line? Here is my data: 2010 spreadsheet = Entities = A18:A45 Numbers = N18:N45 2009 spreadsheet= Entities A18:A41 Numbers = N18:N41 The reason I would like to have the Vlookup is because new data was entered in 2010 but if I just enter the ...

Combine and Insert query
I have linked three csv files to MS Access Table, the table names are as follows MON.csv, Tue.csv and Wed.csv I have combined all the three tables using UnionAll function in query (qry Combine). I would like to have a query/macro funtion which can insert a column to my 'qry combine' identifing the table names example: when the 'qry combine' combines the first table Mon.csv along with the data the query must insert a new column and enter a value as "weekMon" to all the data of Monfile. In the union query you would need to add a calculated field SELECT...

Gridline box checked or unchecked. Gridlines do not print.
I'm new to excell and want to print gridlines. (Office 2003) With the gridline box checked or unchecked the gridlines do not print. Obviously, I must be doing something stupid. But what? Help appreciated, thanks, bobb File/Page Setup/Sheet tab, check Gridlines Bob Umlas Excel MVP "bobb" wrote: > I'm new to excell and want to print gridlines. (Office 2003) > > With the gridline box checked or unchecked the gridlines do not print. > > Obviously, I must be doing something stupid. But what? > > Help appreciated, thanks, bobb No response in...

GPS Customization Query
Hi All, Is there a way to avoid/remove "Quick Links" and "Help" links from the Business Portal Site for the end users? Any help on this would be very handy. Regards, Kuldeep ...

Problem with Microsoft Query
It doesn't return some of the data. It returns all but one actually. And I went into Microsoft Query help and followed the instructions. The file is closed, and the data is formatted the same way. Any advice on how to fix it? Jul, Your question is extremely vague. You should probably provide more explicit information about the details of your query such as The type of file are you trying to query The program you are using to perform the query Details of the query parameters Details of the information that is not being retrieved Also, make sure you change the Subject of your messag...

IMAP Settings and Questions on Use
I'm using O2003 and just changed to using IMAP and was wondering if someone could help out with these questions. 1. Is it possible to change the location of the PST file that IMAP uses. There doesn't seems to be an option. I still have my current PST file with all my data (contacts, tasks, etc) as I want to keep that local. 2. When I purge, it seems I can only purge one folder at a time. There is no option to purge multiple folders at once. Is that correct? 3. There is no auto purge such as purge all items when I close Outlook 2003. Correct? 4. Is there an option to move a deleted ...

combo box list shortcut
Hi I have a combo box on a VBA data entry form. One of the validated lists is approx 100 names long and is a pain scrolling through. Is it possible to maybe enter the first letter of the name and bring up only those beginning with that letter ? -- thanks Roy There's a MatchEntry property for the combobox. Try changing it to fmMatchEntryFirstLetter (either in code or via the properties window. Roy Gudgeon wrote: > > Hi > > I have a combo box on a VBA data entry form. One of the validated lists is > approx 100 names long and is a pain scroll...

GetOpenFileName + Using own dialog template
Hi. I have a question: I am using the GetOpenFileName function to display the Windows FileDialog. I want to use the EXPLORER functionality and therefore I declared the flag OFN_EXPLORER in the OPENNAME-structure. Now here is the problem: I want to use my own dialog-template instead of the standard-file-open dialog. So i wrote my own template and set the attribute templateName of the OPENNAME structur to my own template. Furthermore i activated the flag OFN_ENABLETEMPLATE. But when I call the GetOpenFileName function with these properties I get the errorcode CDERR_GENERALCODES and the dialog is...

Using Exchange 2003 Up to Date Feature
My boss has a Samsung Smart Phone and he asked me to see if he can get his email sent to his phone when he's traveling. I have user initiated sync and up-to-date enabled on his account but I don't know what else I need to do to make this work. Has anyone set this up? A link to an article explaining this process will be fine and appreciated. Thanks, Rafael ...

Hiding Duplicate Records in a List Box
Is there a way to hide (or not list) duplicate records that might be in a List Box? Thanks in advance for any help. Fred Yes, base your listbox on a query that excludes duplicates. PC Datasheet Providing Customers A Resource For Help With Access, Excel And Word Applications resource@pcdatasheet.com "FredK" <fred.kelley@ci.tracy.ca.us> wrote in message news:Oil61gSsHHA.1680@TK2MSFTNGP06.phx.gbl... > Is there a way to hide (or not list) duplicate records that might be in a > List Box? > > Thanks in advance for any help. > > Fred > On Sun, 1...

optional method parameter in MFC ActiveX
How do you set a method parameter as optional in an MFC ActiveX control? Kurt "Kurt" <k_nojunk@larimore.net> wrote in message news:%23HK$bCR4DHA.2468@TK2MSFTNGP09.phx.gbl... > How do you set a method parameter as optional in an MFC ActiveX control? > > Kurt Depends, (1) do you mean when you create an activex control yourself, and you wish to make a parameter optional? Or (2) do you want to pass an optional argument to a method of the ActiveX control? Solution (1) : Make it a variant parameter. If the variant is of type VT_ERROR and the value is DISP_E_PARAMNOTFOU...

Too few parameters?
Hello All I have SELECT statement that I have built using the SQL view of a query. The SELECT statement contains WHERE, GROUP BY, HAVING and ORDER BY parameters. All has been working fine, until today when I have needed to add an extra criteria to the HAVING part: This worked: "HAVING ((([x confirmed].name)=" & Chr(34) & [Forms]![staffs subform new]![employee] & Chr(34) & "))" but this does not: "HAVING ((([x confirmed].entered) =" & Chr(34) & [forms]![staffs subform new]![child813]![entered] & Chr(34) & ")...