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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help?!

Status
Not open for further replies.

Jazzitup

Technical User
Jul 25, 2003
16
BM
I have a form with a series of cbo boxes. I would like to use the contents of a combo box to determine the contents of another...For instance

If combo 1 has user type - director
Combo 2 shows a list of directors...

If combo 1 has user type - client
Combo 2 shows a list of clients(companys)

 
When selecting Client, I simply select it from the list, I tried hitting enter or tab...neither work, they just take me to another position on the form...
 
Hi Jazzitup,

I understand that you're into a whole different ball game but why not try a subform. I think thats what you need.
 
check your spelling of the combo box you want to be visible and not visible both in your coding and on the combo box itself. The coding works... it has to be something simple your missing......
 
The reason I'm avoiding the subform is to create as easy an interface for the user as possible, this is for someone who wants to do MINIMAL data entry work, so I would like things to be a local on the screen as possible.
 
hey do this for me... go to the combo box thats visibilty wont change..... go to properties, event, code, after event then :

' test

Then copy all the coding for the 2 combo boxes in question. Paste in here.
 
I have ContacType: (where they select the contact type)

Private Sub ContacType_AfterUpdate()
Select Case Me!ContacType

Case Is = "Client"
Me!Company_ID.Visible = True

Case Else
Me!Company_ID.Visible = False

End Select
End Sub

There is no events for the Company_ID, Visible set to False.
 
a quick way to do it would be to make both 2 combo boxes invisible then using AfterUpdate on combo1 make a VBA event procedure

If Combo1.text = "Directors" then
combodirectors.visible = true
combocompanies.visible = False
Else if Combo.text = "companies" then
combodirectiors.visible=False
combocompaines.visible=True
End if

there may be a better way, but that will work.
 
Thanks guys the final submission worked....FINALLY...
Bill, I don't know what I have wrong, but I'm going to run with the if statements :)
Thanks again....this has been mossssst helpful
Peace [afro2]
in the middle east
Cool [biggglasses]
thank you for the ears...[bigears]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top