T
Tim
I have this code in an inherited database that moves focus to the main form
and goes to a new record in the form.
****start code****
Private Sub cboObsType_LostFocus()
'If ObsType is blank, set focus on next record (move out of subform).
If Forms!frmDataEntry!subObsType!cboObsType <> "" Then
Else
Forms!frmDataEntry.SetFocus
Forms!frmDataEntry!txtKeypage.SetFocus
DoCmd.GoToRecord , , acNext
End If
End Sub
****end code****
The code seems to run without trouble when using Access 2003. If I open the
database in Access 2007, I can not open the form. More specifically when I
try to open the form from the switchboard, it opens briefly then closes. If
I comment the Else statment, I can open the form, but the behaivor is changed
(the subform will only allow one entry instead of multpile).
What do I change in the code so it my run in both versions of Access? We
have been slow in using just on version of Microsoft Office.
Thanks!
and goes to a new record in the form.
****start code****
Private Sub cboObsType_LostFocus()
'If ObsType is blank, set focus on next record (move out of subform).
If Forms!frmDataEntry!subObsType!cboObsType <> "" Then
Else
Forms!frmDataEntry.SetFocus
Forms!frmDataEntry!txtKeypage.SetFocus
DoCmd.GoToRecord , , acNext
End If
End Sub
****end code****
The code seems to run without trouble when using Access 2003. If I open the
database in Access 2007, I can not open the form. More specifically when I
try to open the form from the switchboard, it opens briefly then closes. If
I comment the Else statment, I can open the form, but the behaivor is changed
(the subform will only allow one entry instead of multpile).
What do I change in the code so it my run in both versions of Access? We
have been slow in using just on version of Microsoft Office.
Thanks!