Hi to all,
can any one tell me how to unload the formcontrols.
This is where iam loading controls using control arrays.If i click on the listbox form controls shoulb be unload
help me out pleaseeeee
Private Sub lstReportList_click()
Dim cboIndexParamList As Integer
Dim dtPickIndexParamList As Integer
Dim txtIndexParamList As Integer
Dim LabelStart As Integer
Dim ParamStart As Integer
Dim J As Integer
cboIndexParamList = 1
dtPickIndexParamList = 1
txtIndexParamList = 1
J = 1
LabelStart = 100
ParamStart = 300
ADOrsReportList.MoveFirst
ADOrsReportList.Move lstReportList.ListIndex
Set ADOrsParameterList = ADOcnn.Execute("EXEC ReportParameterListSelect " & ADOrsReportList!ReportID)
ClearForm
While Not ADOrsParameterList.EOF
If ADOrsParameterList!vbcontroltype = "combo" Then
Load lblComboParameters(cboIndexParamList)
lblComboParameters(cboIndexParamList).Caption = ADOrsParameterList!VBControlLabel
lblComboParameters(cboIndexParamList).Visible = True
lblComboParameters(cboIndexParamList).Top = LabelStart + J
Load cboParameters(cboIndexParamList)
cboParameters(cboIndexParamList).Visible = True
cboParameters(cboIndexParamList).Top = ParamStart + J
ADOrsParameterList.MoveNext
cboIndexParamList = cboIndexParamList + 1
J = J + 750
ElseIf ADOrsParameterList!vbcontroltype = "DTPicker" Then
Load lblDate(dtPickIndexParamList)
lblDate(dtPickIndexParamList).Caption = ADOrsParameterList!VBControlLabel
lblDate(dtPickIndexParamList).Visible = True
lblDate(dtPickIndexParamList).Top = LabelStart + J
Load DatePick(dtPickIndexParamList)
DatePick(dtPickIndexParamList).Visible = True
DatePick(dtPickIndexParamList).Top = ParamStart + J
ADOrsParameterList.MoveNext
dtPickIndexParamList = dtPickIndexParamList + 1
J = J + 750
ElseIf ADOrsParameterList!vbcontroltype = "text box" Then
Load lblBill(txtIndexParamList)
lblBill(txtIndexParamList).Caption = ADOrsParameterList!VBControlLabel
lblBill(txtIndexParamList).Visible = True
lblBill(txtIndexParamList).Top = LabelStart + J
Load txtBill(txtIndexParamList)
txtBill(txtIndexParamList).Visible = True
txtBill(txtIndexParamList).Top = ParamStart + J
ADOrsParameterList.MoveNext
txtIndexParamList = txtIndexParamList + 1
J = J + 750
End If
Wend
End Sub
can any one tell me how to unload the formcontrols.
This is where iam loading controls using control arrays.If i click on the listbox form controls shoulb be unload
help me out pleaseeeee
Private Sub lstReportList_click()
Dim cboIndexParamList As Integer
Dim dtPickIndexParamList As Integer
Dim txtIndexParamList As Integer
Dim LabelStart As Integer
Dim ParamStart As Integer
Dim J As Integer
cboIndexParamList = 1
dtPickIndexParamList = 1
txtIndexParamList = 1
J = 1
LabelStart = 100
ParamStart = 300
ADOrsReportList.MoveFirst
ADOrsReportList.Move lstReportList.ListIndex
Set ADOrsParameterList = ADOcnn.Execute("EXEC ReportParameterListSelect " & ADOrsReportList!ReportID)
ClearForm
While Not ADOrsParameterList.EOF
If ADOrsParameterList!vbcontroltype = "combo" Then
Load lblComboParameters(cboIndexParamList)
lblComboParameters(cboIndexParamList).Caption = ADOrsParameterList!VBControlLabel
lblComboParameters(cboIndexParamList).Visible = True
lblComboParameters(cboIndexParamList).Top = LabelStart + J
Load cboParameters(cboIndexParamList)
cboParameters(cboIndexParamList).Visible = True
cboParameters(cboIndexParamList).Top = ParamStart + J
ADOrsParameterList.MoveNext
cboIndexParamList = cboIndexParamList + 1
J = J + 750
ElseIf ADOrsParameterList!vbcontroltype = "DTPicker" Then
Load lblDate(dtPickIndexParamList)
lblDate(dtPickIndexParamList).Caption = ADOrsParameterList!VBControlLabel
lblDate(dtPickIndexParamList).Visible = True
lblDate(dtPickIndexParamList).Top = LabelStart + J
Load DatePick(dtPickIndexParamList)
DatePick(dtPickIndexParamList).Visible = True
DatePick(dtPickIndexParamList).Top = ParamStart + J
ADOrsParameterList.MoveNext
dtPickIndexParamList = dtPickIndexParamList + 1
J = J + 750
ElseIf ADOrsParameterList!vbcontroltype = "text box" Then
Load lblBill(txtIndexParamList)
lblBill(txtIndexParamList).Caption = ADOrsParameterList!VBControlLabel
lblBill(txtIndexParamList).Visible = True
lblBill(txtIndexParamList).Top = LabelStart + J
Load txtBill(txtIndexParamList)
txtBill(txtIndexParamList).Visible = True
txtBill(txtIndexParamList).Top = ParamStart + J
ADOrsParameterList.MoveNext
txtIndexParamList = txtIndexParamList + 1
J = J + 750
End If
Wend
End Sub