hello,
I am having a problem getting all of my items to display correctly. I have a form that has a combobox. When this combobox changes I need to display different items on the form. This is the code to do this but for some strange reason not all items are set to visible.
Public Function clear() As Boolean
grpDate.Visible = False
grpDoct.Visible = False
grpHide.Visible = False
grpMain.Visible = False
grpOptions.Visible = False
grpPatHasIns.Visible = False
grpSig.Visible = False
grpZip.Visible = False
grpInv.Visible = False
grpInsurance.Visible = False
grpDur.Visible = False
End Function
Private Sub cboReport_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboReport.SelectedIndexChanged
Select Case cboReport.SelectedIndex
Case 0 'Daily Totals
clear()
grpHide.Visible = True
grpDate.Visible = True
Case 1 'Daily Prescriptions
clear()
grpMain.Visible = True
grpDate.Visible = True
txtMainZip.Visible = True
chkMainShowDirect.Visible = True
Case 2 'Patient Profile
clear()
grpMain.Visible = True
grpDate.Visible = True
Case 3 'Patient Info
clear()
grpZip.Visible = True
grpPatHasIns.Visible = True
Case 4 'Doctor Info
clear()
Me.grpZip.Visible = True
Case 5 'Insurance Analysis
clear()
grpDate.Visible = True
grpInsurance.Visible = True
Case 6 'Drug Inventory
clear()
grpInv.Visible = True
Case 7 'DUR
clear()
grpDur.Visible = True
grpDate.Visible = True
grpDoct.Visible = True
Case 8 'SIG Codes
clear()
grpSig.Visible = True
Case 9 'Current Medications (Refills Available)
clear()
grpDate.Visible = True
grpMain.Visible = True
chkMainShowSig.Visible = True
chkMainShowVoid.Visible = True
lblMainFacility.Visible = False
lblMainZip.Visible = False
chkMainShowDirect.Visible = False
chkMainRphSig.Visible = False
txtMainFacility.Visible = False
txtMainZip.Visible = False
Case 10 'Delivery Ticket
clear()
grpDate.Visible = True
grpMain.Visible = True
chkMainPatSig.Visible = False
chkMainShowCost.Visible = True
chkMainShowPrice.Visible = True
chkMainqty.Visible = True
lblMainZip.Visible = False
lblMainFacility.Visible = True
txtMainFacility.Visible = True
chkMainRphSig.Visible = False
chkMainShowDirect.Visible = False
chkMainShowSig.Visible = False
Case 11 'Pickup Ticket
clear()
grpMain.Visible = True
grpDate.Visible = True
chkMainShowSig.Visible = False
chkMainShowCost.Visible = False
chkMainShowPrice.Visible = True
txtMainZip.Visible = False
lblMainZip.Visible = False
chkMainShowVoid.Visible = False
Case 12 'Refill Compliance
clear()
grpDoct.Visible = True
grpDate.Visible = True
grpMain.Visible = True
chkMainShowPrice.Visible = False
chkMainShowCost.Visible = False
chkMainShowVoid.Visible = False
chkMainShowDirect.Visible = False
End Select
End Sub
Any ideas and tips are greatly appreciated.
Thanks