F
Fred Parkinson
Why does Access insist i can't hide a control that has
the focus, when I specifically move the focus before
attempting to hide the control? The following is the
code that fails:
strSQL = "SELECT tcourses.a1required,
tcourses.a2required, ... FROM...etc."
Set rstCourses = CurrentDb.OpenRecordset(strSQL,
dbOpenDynaset)
rstCourses.MoveFirst
'in the following line I specifically move the focus to a
control that is not being hidden:
Me.txtDescription.SetFocus
' here I attempt to hide or reveal the controls (on a
subform) that are specific to the course record being
examined, but I immediately get the error "Can't hide a
control that has the focus":
Me![fRegDetailsSPMS]![chkA1Submitted].Visible =
rstCourses!a1required
Any ideas are greatly appreciated
Fred Parkinson
(e-mail address removed)
the focus, when I specifically move the focus before
attempting to hide the control? The following is the
code that fails:
strSQL = "SELECT tcourses.a1required,
tcourses.a2required, ... FROM...etc."
Set rstCourses = CurrentDb.OpenRecordset(strSQL,
dbOpenDynaset)
rstCourses.MoveFirst
'in the following line I specifically move the focus to a
control that is not being hidden:
Me.txtDescription.SetFocus
' here I attempt to hide or reveal the controls (on a
subform) that are specific to the course record being
examined, but I immediately get the error "Can't hide a
control that has the focus":
Me![fRegDetailsSPMS]![chkA1Submitted].Visible =
rstCourses!a1required
Any ideas are greatly appreciated
Fred Parkinson
(e-mail address removed)