P
PHisaw
Hi,
I have been working on a filter problem and the post I was working from
hasn't received any replies and as I've worked out some of the problems, I
thought I would repost with the one left that is causing the most difficulty.
I have a main form, with subform. The subform has a field "JobNumber" that
when clicked will open a form "fWorkLogReminder" with null values in
"StopTime" for specific field "Tech" from combo on main form. All works
great - except - when no records match (Tech has no empty StopTimes) and the
form still opens with a blank entry screen that says 1 of 1. Can't add to it
(don't want to) - it just shows blank form. I don't want the user to have
this annoyance of blank screen to close.
Private Sub JobNumber_Click()
If IsNull(Forms!fWorkLog!StopTime) Then
DoCmd.OpenForm "fWorkLogReminder", , , , acFormEdit
Else
DoCmd.OpenForm "fGeneralInfo", , , "JobNumber=" & Me!JobNumber
End If
End Sub
The query for fWorkLogReminder references the Tech from the main form in the
criteria grid.
I have worked on this for quite some time and have found no solution. If
anyone can help, it will be greatly appreciated!!
Thanks,
Pam
I have been working on a filter problem and the post I was working from
hasn't received any replies and as I've worked out some of the problems, I
thought I would repost with the one left that is causing the most difficulty.
I have a main form, with subform. The subform has a field "JobNumber" that
when clicked will open a form "fWorkLogReminder" with null values in
"StopTime" for specific field "Tech" from combo on main form. All works
great - except - when no records match (Tech has no empty StopTimes) and the
form still opens with a blank entry screen that says 1 of 1. Can't add to it
(don't want to) - it just shows blank form. I don't want the user to have
this annoyance of blank screen to close.
Private Sub JobNumber_Click()
If IsNull(Forms!fWorkLog!StopTime) Then
DoCmd.OpenForm "fWorkLogReminder", , , , acFormEdit
Else
DoCmd.OpenForm "fGeneralInfo", , , "JobNumber=" & Me!JobNumber
End If
End Sub
The query for fWorkLogReminder references the Tech from the main form in the
criteria grid.
I have worked on this for quite some time and have found no solution. If
anyone can help, it will be greatly appreciated!!
Thanks,
Pam