473,385 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Using combo box element as search criteria

I have created a form with a combo box that allow user to select a
certain employee name and when user select the name the report based on
query is generated.
I want to include an extra option in the combo box so that if user
wants to generate a report for all the employees.
Thanks
Pervaiz Ahmad

Jan 4 '06 #1
3 1460
Red
Ahhh... time to blow off coding, and help some people! :D

Anyhow, you can program a command button to mimic selecting all the
employees, and create a report off of that. I honestly am not that
great at programming, but, it's really not that hard....

i.e.

1 Employee
cmdButton1_click()
Dim employeeID as integer
employeeID = combo1.value
'do stuff with the value here....
end sub
All emlpoyees
cmbButtons2_click()
dim X as integer, EmployeeID as integer

for X = 0 to combo1.listcount - 1
employeeID = combo1.ListIndex(X)
'do stuff with the value here....
next X

end sub
~Red

Jan 4 '06 #2
thanks it is a good idea but instead of that why not create another
query or copy the same one without any criteria and execute it from
that button.

Jan 5 '06 #3

pe***********@gmail.com wrote:
I have created a form with a combo box that allow user to select a
certain employee name and when user select the name the report based on
query is generated.
I want to include an extra option in the combo box so that if user
wants to generate a report for all the employees.
Thanks
Pervaiz Ahmad


You can edit the underlying query of the combo box to include an
"(All)" option. Selecting this will select all records. Lots of
tutorials available on this. The first one seems most relevant to your
situation:

http://www.accessdatabasetips.com/ad...-combobox.html

http://www.mvps.org/access/forms/frm0043.htm

http://msdn.microsoft.com/library/de...ml/ima0143.asp

Kurt

Jan 5 '06 #4

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

Similar topics

1
by: Steve Zifah | last post by:
Im just a beginner using MS Access 2002. I have a database set up with only 1 table and need help searching the database. I would like the search to be similar to a web search interface. I...
3
by: pelcovits | last post by:
I am trying to set up an unbound form to enter report criteria. I've followed the MS Office Assistance document: "Create a form to enter report criteria" which describes how to enter data (such...
2
by: Ray Todd Jr | last post by:
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...
2
by: Damon Cherne | last post by:
Here is my issue. I have created a form called “Search” that has several unbound combo boxes, one for each of the attribute that match a column in the Table . Each combo box has input from a...
0
by: Saintor | last post by:
I have a combo connected to a table, description and its code. Bound column is 2 (code) and widths are at 2";0.5". When not expanded, the combo shows the description only Is there a way to...
5
by: Col | last post by:
I have a query with criteria that comes from a combo box on a form. I'd like to set the query up so the user can either limit the criteria to the selection in the combo box or the user can pull all...
3
by: mattandlisa3 | last post by:
Is there a way to populate a combo box with a list of fields from a table or query? My purpose in doing this is to allow a user to select a field to search. Also, does anyone have any advice as...
8
by: hollinshead | last post by:
Hi there i have bit of an issue. i haver this database that is purely used for searching records under certain criteria. This criteria is chosen by the user on a form using list boxes and combo...
2
by: hollinshead | last post by:
hi there, i have been having this issue for quite some time now and i cant seem to get my head around it. I am trying to create a database for candidates CV's and covering letters. basically the data...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.