I
Ingo Hanke
Dear,
I have a form where i have to populate diferent comboboxes at diferent
stages with data from a seperate database.
Im trying to write a Function that would easally repeate the task, the
main problem is specifeing what combobox to use. here is a part of my
coding
Public Sub LoadCB(cbName As Control, SelectionString As String)
cbCount = 0
Set rstLoadCB = VMSDatabase.OpenRecordset(SelectionString)
With rstLoadCB
.MoveLast
cbCount = .Counter
.MoveFirst
If TypeName(CB) = cbName Then
End If
Next CB
End With
Set rstLoadCB = Nothing
End Sub
I have a form where i have to populate diferent comboboxes at diferent
stages with data from a seperate database.
Im trying to write a Function that would easally repeate the task, the
main problem is specifeing what combobox to use. here is a part of my
coding
Public Sub LoadCB(cbName As Control, SelectionString As String)
cbCount = 0
Set rstLoadCB = VMSDatabase.OpenRecordset(SelectionString)
With rstLoadCB
.MoveLast
cbCount = .Counter
.MoveFirst
If TypeName(CB) = cbName Then
End If
Next CB
End With
Set rstLoadCB = Nothing
End Sub