vb.net controls:
I am using VB 6 Enterprise Edition. I am using an Access Database that was
created via Visual Data Manager.
I have 2 DropDown Combo Boxes. The 1st one called "cboCalcBuyListName"; the
2nd one is "cboCalcBuyListDate"
Scenerio: cboCalcBuyListName has names in it. cboCalcBuyListDate has dates
based off of the Name. So one Name can have one date, another name can have 3
dates, etc.
The "call" to these subroutines are in the "Got_Focus of the appropriate
combo box.
What's happening is this-- Let's say "cboCalcBuyListName" has: Name1 and
Name2. cboCalcBuyListDate for Name1 has one date listed (1/25/05) and Name2
has two dates listed (1/25/05, 1/26/05)
When I click on Name2, it will popluale cboCalcBuyListDate with 2 dates,
then when I go back (or forward) and click on Name1, the cboCalcBuyListDate
has the correct date in it BUT it also has the space below as if it had
another entry. When I close the cboCalcBuyListDate combo box, this space
which is part of the drop-down combo box seems to be still on the form.
Could this be a problem with a "dll" or "ocx" or my code?
Here is the code to populate each Combo Box:
Sub PopulateCalcBuyListName()
datBuyList.Refresh
cboCalcBuyListName.Clear
HoldCalcBuyListName = ""
On Error Resume Next
datBuyList.Recordset.MoveFirst
Do Until datBuyList.Recordset.EOF
If datBuyList.Recordset("blName") <> HoldCalcBuyListName Then
cboCalcBuyListName.AddItem datBuyList.Recordset("blName")
HoldCalcBuyListName = datBuyList.Recordset("blName")
End If
datBuyList.Recordset.MoveNext
Loop
End Sub
-----------------------------------------------------------
Sub PopulateCalcBuyListDate()
cboCalcBuyListDate.Clear
HoldCalcBuyListDate = ""
On Error Resume Next
datBuyList.Recordset.MoveFirst
Do Until datBuyList.Recordset.EOF
If datBuyList.Recordset("blName") = cboCalcBuyListName.Text And _
datBuyList.Recordset("blDate") <> HoldCalcBuyListDate Then
cboCalcBuyListDate.AddItem datBuyList.Recordset("blDate")
HoldCalcBuyListDate = datBuyList.Recordset("blDate")
End If
datBuyList.Recordset.MoveNext
Loop
End Sub
-------------------------------------------------------------
-------------------------------------------------------------
Thank You,