View Records for Editing Only

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
 
C

chukieq

hi .. I have done a similar solution for a client and I suggest you
write a function which queries the table you are looking up for open
issues and return a number which should represent a outstanding/open
issues. You then will attach the function to the clicked method and if
no records are found then I would msgbox the user telling them so,
otherwise have the form pop up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Prompt for Parameter Value Help 6
Parameter Value Help 1
Error 2427 0
Parameter Value?? 10
Repost - Open Form 9
Open form 0
Do I need .FindFirst? 0
Design Help, Please 0

Top