grndzyro
09-11-2003, 11:35 AM
Ok here is a my issues...though, this may be some easy answers for some people, obviously though I am not some people..
First here is the code I am working with
VB
Dim varVals as Variant
Dim varVal as Variant
Dim varNam as Variant
Dim varNams as Variant
Dim varMails as Variant
Dim varMail as Variant
lstResults.ListIndex=0
Set result = results.Item(lstResults.List(lstResults.ListIndex))
strVals = result.FieldValue("cn")
strNams = result.FieldValue("fullname")
strMails = result.FieldValue("mail")
For Each varVal In varVals
lstVals.AddItem varVal
Next
For Each varNam in varNams
lstNames.AddItem varNam
Next
For Each varMail in varMails
lstMail.AddItem varMail
Next
ok the "result" is pulled from an LDAP component, but should not be an issue since my issues are with the list boxes...
I have 4 listboxes as you can see be the code
1st is lstResults - this brings back my query of items
2nd is lstVals which returns a value depending on what is selected in lstResults
same goes for the last 2, lstNames and lstMail
When I click directly on the entry in the lstResults box, the other list boxes populate fine, if I use the arrow key and arrrow up or down it seem to be back 1 from where it should be(meaning I hit up, it doesnt move in the lstVals but does in the lstResult, I hit up again and then it moves in all making the lstResults different than the lstVals (this is probably simple,..)
The other part is, I want to hide the lstResults, but be able to hit the arrow key to populate the other list boxes accordingly, problem is, when I click my search button, I have to then click on the lstResults to be able to use the arrow keys, how can I send focus to the lstResults on cmd_Click???
Sorry its lengthy, but this will make life so much easier on me if I can get this ldap query going well...Thanks
First here is the code I am working with
VB
Dim varVals as Variant
Dim varVal as Variant
Dim varNam as Variant
Dim varNams as Variant
Dim varMails as Variant
Dim varMail as Variant
lstResults.ListIndex=0
Set result = results.Item(lstResults.List(lstResults.ListIndex))
strVals = result.FieldValue("cn")
strNams = result.FieldValue("fullname")
strMails = result.FieldValue("mail")
For Each varVal In varVals
lstVals.AddItem varVal
Next
For Each varNam in varNams
lstNames.AddItem varNam
Next
For Each varMail in varMails
lstMail.AddItem varMail
Next
ok the "result" is pulled from an LDAP component, but should not be an issue since my issues are with the list boxes...
I have 4 listboxes as you can see be the code
1st is lstResults - this brings back my query of items
2nd is lstVals which returns a value depending on what is selected in lstResults
same goes for the last 2, lstNames and lstMail
When I click directly on the entry in the lstResults box, the other list boxes populate fine, if I use the arrow key and arrrow up or down it seem to be back 1 from where it should be(meaning I hit up, it doesnt move in the lstVals but does in the lstResult, I hit up again and then it moves in all making the lstResults different than the lstVals (this is probably simple,..)
The other part is, I want to hide the lstResults, but be able to hit the arrow key to populate the other list boxes accordingly, problem is, when I click my search button, I have to then click on the lstResults to be able to use the arrow keys, how can I send focus to the lstResults on cmd_Click???
Sorry its lengthy, but this will make life so much easier on me if I can get this ldap query going well...Thanks