What Am I Missing?

  • Thread starter Thread starter PHisaw
  • Start date Start date
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
 
Where you say -->
then it will change the job number on the record with the open time to the
job number that opens the timeform.

Looking at the combo where tech's can choose a job, is it an unbound combo?


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Jeanette,

Thank you for your reply. I'm sorry that it's taken so long to respond to
your question The tech's choose a job number from a list box that populates
with a list of jobs that have been assigned to them when they choose their
name from a combo box.

Thanks again,
Phisaw
 
Back
Top