Clear Combo Box Window

S

Sky

I have a Combo Box that runs queries for Anniversaries. Is
it possible to clear the Combo Box window after the query
is run. What happens is after the query runs, the query
file name remains in the Combo Box window.

For example if I run a query whose file name is "January
Anniversary", then "January Anniversary" remains in the
Combo Box window. Is there a way to keep the window blank
after the query is run?
 
M

Marshall Barton

Sky said:
I have a Combo Box that runs queries for Anniversaries. Is
it possible to clear the Combo Box window after the query
is run. What happens is after the query runs, the query
file name remains in the Combo Box window.

For example if I run a query whose file name is "January
Anniversary", then "January Anniversary" remains in the
Combo Box window. Is there a way to keep the window blank
after the query is run?


Just set the combo box to Null.
 
S

Sky

-----Original Message-----
Sky said:
I have a Combo Box that runs queries for Anniversaries. Is
it possible to clear the Combo Box window after the query
is run. What happens is after the query runs, the query
file name remains in the Combo Box window.

For example if I run a query whose file name is "January
Anniversary", then "January Anniversary" remains in the
Combo Box window. Is there a way to keep the window blank
after the query is run?


Just set the combo box to Null.

--
Marsh
MVP [MS Access]
.
Exactly where in the Combo Box properties do I set the
Null value?
 
M

Marshall Barton

-----Original Message-----
Sky said:
Exactly where in the Combo Box properties do I set the
Null value?

Well, it's the Value property, but you have to use code in
an event procedure to set it. You never said how you're
"running" the query, but I presume it is done by some code
in some event. Just add
Me.thecombobox = Null
after whatever code runs the query.
 
S

Sky

-----Original Message-----
Sky said:
Exactly where in the Combo Box properties do I set the
Null value?

Well, it's the Value property, but you have to use code in
an event procedure to set it. You never said how you're
"running" the query, but I presume it is done by some code
in some event. Just add
Me.thecombobox = Null
after whatever code runs the query.

--
Marsh
MVP [MS Access]
.
Thanks a million times over Marshall for your help. I
followed your instructions and it works perfectly. You
ROCK dude :)
 

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

Top