G
Guest
I have a combo box that apears if you select yes in another combo box. When I
go to the next record all my combo boxes are visable. I need specific ones to
hide each time I go to a new record.
'Open Form full size
Private Sub Form_Load()
DoCmd.Maximize
End Sub
'Show list of symptomatic
Private Sub cbo_sympto_beforeUpdate(Cancel As Integer)
If cbo_sympto = "Yes" Then
cbo_symp_out.Visible = True
Else
cbo_symp_out.Visible = False
End If
End Sub
Private Sub cbo_risk_BeforeUpdate(Cancel As Integer)
If cbo_risk = "Yes" Then
cbo_risk_out.Visible = True
Else
cbo_risk_out.Visible = False
End If
End Sub
'Private Sub cbo_risk_out_BeforeUpdate(Cancel As Integer)
'If cbo_risk = "Yes" And cbo_risk_out = "Clinically Significant Cardiac
Disease" Then
' cbo_heart_disease.Visible = True
'Else
' cbo_heart_disease.Visible = False
'End If
'End Sub
Private Sub cmd_save_Click()
On Error GoTo Err_cmd_save_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_cmd_save_Click:
'cbo_risk_out.Visible = False
'cbo_symp_out.Visible = False
DoCmd.GoToRecord , , acNext
Exit Sub
Err_cmd_save_Click:
MsgBox Err.Description
Resume Exit_cmd_save_Click
End Sub
Private Sub cmd_exit_Click()
On Error GoTo Err_cmd_exit_Click
DoCmd.Quit
Exit_cmd_exit_Click:
Exit Sub
Err_cmd_exit_Click:
MsgBox Err.Description
Resume Exit_cmd_exit_Click
End Sub
Private Sub cmd_next_Click()
On Error GoTo Err_cmd_next_Click
DoCmd.GoToRecord , , acNext
Exit_cmd_next_Click:
Exit Sub
Err_cmd_next_Click:
MsgBox Err.Description
Resume Exit_cmd_next_Click
End Sub
go to the next record all my combo boxes are visable. I need specific ones to
hide each time I go to a new record.
'Open Form full size
Private Sub Form_Load()
DoCmd.Maximize
End Sub
'Show list of symptomatic
Private Sub cbo_sympto_beforeUpdate(Cancel As Integer)
If cbo_sympto = "Yes" Then
cbo_symp_out.Visible = True
Else
cbo_symp_out.Visible = False
End If
End Sub
Private Sub cbo_risk_BeforeUpdate(Cancel As Integer)
If cbo_risk = "Yes" Then
cbo_risk_out.Visible = True
Else
cbo_risk_out.Visible = False
End If
End Sub
'Private Sub cbo_risk_out_BeforeUpdate(Cancel As Integer)
'If cbo_risk = "Yes" And cbo_risk_out = "Clinically Significant Cardiac
Disease" Then
' cbo_heart_disease.Visible = True
'Else
' cbo_heart_disease.Visible = False
'End If
'End Sub
Private Sub cmd_save_Click()
On Error GoTo Err_cmd_save_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_cmd_save_Click:
'cbo_risk_out.Visible = False
'cbo_symp_out.Visible = False
DoCmd.GoToRecord , , acNext
Exit Sub
Err_cmd_save_Click:
MsgBox Err.Description
Resume Exit_cmd_save_Click
End Sub
Private Sub cmd_exit_Click()
On Error GoTo Err_cmd_exit_Click
DoCmd.Quit
Exit_cmd_exit_Click:
Exit Sub
Err_cmd_exit_Click:
MsgBox Err.Description
Resume Exit_cmd_exit_Click
End Sub
Private Sub cmd_next_Click()
On Error GoTo Err_cmd_next_Click
DoCmd.GoToRecord , , acNext
Exit_cmd_next_Click:
Exit Sub
Err_cmd_next_Click:
MsgBox Err.Description
Resume Exit_cmd_next_Click
End Sub