Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear Value from Combo Box that is Populated by another Combo Box

Status
Not open for further replies.

Halfgreek

Technical User
Mar 17, 2004
3
US
I have a combo box (lets call this one "Component") that is populated by query based on the selection from another combo box (lets call this one "System").
(There are many components in a System)

I'm using the following On AfterUpdate on System:
Private Sub system_AfterUpdate()
component.Requery
End Sub

This works fine. It repopulates the Component combo box list with the new values when I change from one System value to another System value. However, if I had already selected a Component value this value remains the value until I choose one from the newly populated list.

Basically, I need a command that will clear the value in Component on AfterUpdate of System. Is there a way to do this?

I'm just learning all this so any help you can provide would be great.
 
Hi!

Try setting it to nothing:

[tt]Me!component = vbNullString[/tt]

Roy-Vidar
 
The following will clear that combo box.

Code:
[component] = Null

Good luck

Xavier

----------------------------------------
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far the Universe is winning."
Rick Cook
----------------------------------------
 
Great! Thanks to both of you for the help. I've learned a million new things today!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top