473,672 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Combo/List Box in Query Question/Problem

I have created form, query and report.

In the form I have a Combo Box which pulls the search criteria
(SaleStatus) from one of my tables. When I select a status and click
on the search button it should run the query and then preview the
report.

The form is an unbound form with the row source type set to
table/query. The row source is a select statement pulling the data from
the table. The Name of the combobox is SaleStatus.

The search button has the following code attached to the on click
event:

Private Sub cmdSEARCH_Click ()
DoCmd.OpenRepor t "rptPROPERT Y", acViewPreview
End Sub

The query has the following code in the criteria:
[forms]![fmPROPERTY]![SaleStatus]

Here is what is happening.

If I change the box to a text box and manually type in the status and
click on the command button, the report is previewed with the correct
information being displayed.

If I however, use a Combo Box or a List Box, the data in the previewed
report is blank.

What am I not doing correctly here...

Thanks,

Ray.

Nov 13 '05 #1
2 1902
forget the query and just pass the filter directly in the Open event of
the report.
Sounds like you may have multiple columns in your textbox and you can't
see one of them. check the column count. Make sure you're referencing
the right one.

Listbox... hmm... check www.mvps.org - there's an article there on how
to filter report results based on what's selected in a listbox.

Nov 13 '05 #2
You are correct, when the wizard set up the listbox (and the combo box)
it set up both the index and the content field and bound the first
column (the index ( a hidden column). I changed the bound column to 2
and it works magically.

Thanks for the suggestion, it helped.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9362
by: B | last post by:
I know there are several ways to speed up combo boxes and form loading. Most of the solutions leave rowsource of the combo box blank and set the rowsource to a saved query or an SQL with a where clause after users typed in one or several letters/digits. My problem is as follows Most of the time I need to display form in continuous format, that means the combo box will appear in each record. For example I have a form to let users view...
1
2711
by: Robert Neville | last post by:
The solution to my dilemma seems straight-forward, yet my mind has not been forthcoming with a direct route. My Project form has a tab control with multiple sub-forms; these distinct sub-forms relate addresses (multiple addresses); companies, contacts, and tasks to each project (one to many). My challenge lies with the task sub-form which links to the Project form through ProjID. The task record links back to the respective master...
6
309
by: William Bradley | last post by:
I have a production table and its accompanying form. There can be up to ten ingredients in what is produced. The ingredients are obtained from the incoming goods table which supplies the two parameters that I use, "Name" and "CatlogNo". This production table needs to contain each ingredient by name and catalogue number. With help from this list I was able to set up a combo box that allowed me to select a particular ingredient, and when...
3
3202
by: mal | last post by:
Sorry for repost - system added to another subject for some reason Have tried numerous ideas from the group to solve this one. It is such a simple example that it should be straightforward ! I just want to add a new item to a combo that has data from a file, by typing in the new value , adding to the file and the requerying to get the new valus in the list. i.e. a data entry and data display combo box. I select an item from cmb1 and...
3
2607
by: geribosi | last post by:
I have a question that may have been asked numerous times, however from the previous postings no one seems to have a plausible explanation. This is a performance issue that is very common: I have a split Access database- tables and front end both sit in at users local drive(except when theuser connects to the server to import update files). I have two unbound combo boxes, when I make a selection to the first one the second's row source...
4
7175
by: meganrobertson22 | last post by:
Hi Everyone- I have a question about how to add and then use the "All" selection in a combo box. I am trying to figure out how to: (1) add "All" as a selection to a combo box and then (2) how to use the selection "All" as criteria for a field in a query, which is used to generate data for a report.
2
1652
by: lottaviano | last post by:
I have a form with two combo boxes. The value chosen in the first combo box (cbo1) is supposed to change the values that appear in the second combo box (cbo2). This currently works great for the first record entered by the user (continuous forms). However in the second record, cbo2 shows the values influenced by cbo1 in the first record, rather than the 2nd record (i.e. it doesn't update). My problem may be that both combo boxes have...
1
3096
by: lawton | last post by:
Source: this is an access 2003 question My knowledge level: reading books, internet, and trial & error; no formal training I'm trying to get a running sum of what's filtered in a subform which is ultimately driven by the results of two combo boxes: 1st combo box on main form that filters desired results for 2d combo box on sub form Main form: no record source. Has an unbound combo box. name: frminput combo name: cboAccounts The row...
13
8626
by: mirandacascade | last post by:
I want to set things up such that a section of code will have been executed by the time one clicks on the drop down arrow on a combo box control. Currently, that section of code resides in the OnGetFocus event of the combo box control, and this appears to work...I'm guessing because one cannot click on the drop down arrow of a combo box control without first having the combo box control receive focus. But I noticed that the code gets...
0
8485
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8403
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
7446
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6238
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5704
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4417
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2819
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.