F
Fred Thebeau
I have a combobox that lists several different types of surgery. When you
click on the particular type of surgery it populates a listbox with the
surgeons associated with that type of surgery. That functionality works
fine. The problem is that when I click on the command button to add the
record and clear the form for the next record to be put in, it does not
clear the contents of the listbox. I am able to clear everything else on my
form but the listbox. Any help would be appreciated. Below is my code for
the combobox and the command button.
Private Sub cboSurgicalSpecialty_AfterUpdate()
Me!lstSurgeon.Requery
End Sub
Private Sub cmdAddRecord_Click()
On Error GoTo Err_cmdAddRecord_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmdAddRecord_Click:
Exit Sub
Err_cmdAddRecord_Click:
MsgBox Err.Description
Resume Exit_cmdAddRecord_Click
Anesthesiologist = ""
DateOfService = ""
cboSurgicalSpecialty = ""
lstSurgeon = ""
DelayCode1 = ""
DelayCode2 = ""
DelayCode3 = ""
DelayCode4 = ""
DelayCode5 = ""
Comments = ""
End Sub
Thank you,
Fred
click on the particular type of surgery it populates a listbox with the
surgeons associated with that type of surgery. That functionality works
fine. The problem is that when I click on the command button to add the
record and clear the form for the next record to be put in, it does not
clear the contents of the listbox. I am able to clear everything else on my
form but the listbox. Any help would be appreciated. Below is my code for
the combobox and the command button.
Private Sub cboSurgicalSpecialty_AfterUpdate()
Me!lstSurgeon.Requery
End Sub
Private Sub cmdAddRecord_Click()
On Error GoTo Err_cmdAddRecord_Click
DoCmd.GoToRecord , , acNewRec
Exit_cmdAddRecord_Click:
Exit Sub
Err_cmdAddRecord_Click:
MsgBox Err.Description
Resume Exit_cmdAddRecord_Click
Anesthesiologist = ""
DateOfService = ""
cboSurgicalSpecialty = ""
lstSurgeon = ""
DelayCode1 = ""
DelayCode2 = ""
DelayCode3 = ""
DelayCode4 = ""
DelayCode5 = ""
Comments = ""
End Sub
Thank you,
Fred