Do I need .FindFirst?

P

Pam

Hi,

I'm having problem with the code below not going to the form as needed.
When CboTech (TechA) selects JobNumber from fttswitchboard and has time
running on another job and he is the tech on record 1 in the
fttWorkLogHiddenOpen form, then the fttWorkLogReminder form opens to his
name.

If TechB selects a job from the switchboard and he has time running on
record 2 in the fttWorkLogHiddenOpen form then it bypasses the
fttWorkLogReminder form and opens the fGenInfoTT at the job number selected
and allows him to start another job in addition to the one he already has
open.

If it makes a difference, both the hidden form and the reminder form work
from the same query.

If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) And _
(Forms!fttWorkLogHiddenOpen!CboTech) = Forms!fttswitchboard!CboTech Then
DoCmd.OpenForm "fttWorkLogReminder", , , "tech='" &
Forms!fttswitchboard!CboTech & "'"
Else
DoCmd.OpenForm "fGenInfoTT", , , "jobnumber=" & Me!JobNumber
End If

I was thinking maybe I need to find the record that matches on the
fttWorkLogHiddenOpen form first before asking it to open the forms, but have
tried code form researched posts and can't seem to get anything to work.
I would greatly appreciate any help.
Thanks in advance,
Pam
 

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

Error 2427 0
If And Statement 5
What Am I Missing? 2
Syntax error (missing operator) 4
Repost - Open Form 9
Open form 0
Design Help, Please 0
Parameter Value?? 10

Top