Combo Box Items

M

M.A.Halim

I have [Months] Combo Box in my form that has the Items "View All, Jan,
Feb,.....Dec"
this combo is feeding a Qry criteria to choose which month to view the
results. What is the code that I can use so when the user chooses the "View
all" the query or even the report will view all the months results.

Thanks for your time !!!
 
A

Al Campagna

M.A.,
I usually do it a bit differently. Remove the "View All" from the
combo (I assume it's a value list)
Now, this criteria in your query... (use your own object names)

Like Forms!frmYourForm!cboSelectMonth & "*"

This would allow the following two options...
If cboSelectMonth is left blank (Null) all months will be returned.
If a month value is selected, only that month will be returned.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
M

M.A.Halim

Thanks a lot
exactly what I'm Looking for.
--
M.A.Halim
(e-mail address removed)


Al Campagna said:
M.A.,
I usually do it a bit differently. Remove the "View All" from the
combo (I assume it's a value list)
Now, this criteria in your query... (use your own object names)

Like Forms!frmYourForm!cboSelectMonth & "*"

This would allow the following two options...
If cboSelectMonth is left blank (Null) all months will be returned.
If a month value is selected, only that month will be returned.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


M.A.Halim said:
I have [Months] Combo Box in my form that has the Items "View All, Jan,
Feb,.....Dec"
this combo is feeding a Qry criteria to choose which month to view the
results. What is the code that I can use so when the user chooses the
"View
all" the query or even the report will view all the months results.

Thanks for your time !!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top