P
PHisaw
Hi,
I have a time tracking database with a switchboard that has cboTech listing
all tech names that when one is selected it will show list box of repair
jobs, list box of fab jobs and a combo box on the main switchboard that lists
all jobs so they can select one to work on that doesn't appear in their
lists. When they select one of these jobs a "timeform" opens to enter stop
and start times and other info.
Sometimes, they forget to log off one job before starting another and I have
set up a hidden form "hiddenopen" with all time where stop time is blank. I
have another form "reminder" that is supposed to open before "timeform" when
user has open time and has not logged off. I've listed the code below.
The problem is it is acting strange. Sometimes it will open as it should,
other times such as when I completely close the database and reopen, it goes
straight to the timeform without the reminder that time is open and then it
will change the job number on the record with the open time to the job number
that opens the timeform. I hope this make sense.
Private Sub JobNumber_Click()
If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) And _
Forms!fttWorkLogHiddenOpen!Tech = Forms!fttswitchboard!CboTech Then
DoCmd.OpenForm "fttWorkLogReminder"
Else
DoCmd.OpenForm "fTimeForm"
Forms!ftimeform!JobNumber = Forms!fttswitchboard!CboJobNumberSelect
Forms!ftimeform!Tech = Forms!fttswitchboard!CboTech
End If
End Sub
I would really appreciate any help with this.
Thanks in advance,
Phisaw
I have a time tracking database with a switchboard that has cboTech listing
all tech names that when one is selected it will show list box of repair
jobs, list box of fab jobs and a combo box on the main switchboard that lists
all jobs so they can select one to work on that doesn't appear in their
lists. When they select one of these jobs a "timeform" opens to enter stop
and start times and other info.
Sometimes, they forget to log off one job before starting another and I have
set up a hidden form "hiddenopen" with all time where stop time is blank. I
have another form "reminder" that is supposed to open before "timeform" when
user has open time and has not logged off. I've listed the code below.
The problem is it is acting strange. Sometimes it will open as it should,
other times such as when I completely close the database and reopen, it goes
straight to the timeform without the reminder that time is open and then it
will change the job number on the record with the open time to the job number
that opens the timeform. I hope this make sense.
Private Sub JobNumber_Click()
If IsNull(Forms!fttWorkLogHiddenOpen!StopTime) And _
Forms!fttWorkLogHiddenOpen!Tech = Forms!fttswitchboard!CboTech Then
DoCmd.OpenForm "fttWorkLogReminder"
Else
DoCmd.OpenForm "fTimeForm"
Forms!ftimeform!JobNumber = Forms!fttswitchboard!CboJobNumberSelect
Forms!ftimeform!Tech = Forms!fttswitchboard!CboTech
End If
End Sub
I would really appreciate any help with this.
Thanks in advance,
Phisaw