P
PHisaw
Hi,
I have an unbound form 'fTTSwitchboard' that has two combo boxes - one lists
tech names 'CboTech' and the other lists job numbers 'CboJobNumberSelect.
There is also a subform for list of jobs assigned to CboTech. The
JobNumberSelect combo box lets them enter a job number that is not on their
list and a form 'fGeneralInfoTT' opens giving specific about job with a
subform 'fWorkLog' that has a combo box 'CboTech' where they can select their
name and text boxes to enter start and stop times.
Everything works well now, but I would like to tweek it. When the form
'fGeneralInfoTT' opens, I would like the subform 'fWorkLog' to have the
'CboTech' name filled in with the name entered from 'fTTSwitchboard'. I can
make it do this but the problem is if I enter Joe on the first form, I can
open a job and have Joe's name filled in the combo box on the subform of the
second form. I enter start time for Joe, close form and go back to the
switchboard and click on Mike. I select same job for Mike and it will open
with his name, but with Joe's time. I'm not sure what I need to do to get
it to open with a fresh screen for Mike, but at the same time when Joe
selects his name from the switchboard, have it open to his record with the
previous start and empty stop time. I've tried openargs, but couldn't get it
to work. Currently this is what I have.
Private Sub CboJobNumberSelect_AfterUpdate()
On Error GoTo CboJobNumberSelect_AfterUpdate_Error
If IsNull(Forms!fttworkloghiddenopen!StopTime) Then
DoCmd.OpenForm "fTTWorkLogReminder"
End If
DoCmd.OpenForm "fGeneralInfoTT", , , "JobNumber=" &
Me!CboJobNumberSelect
CboJobNumberSelect_AfterUpdate_Exit:
Exit Sub
CboJobNumberSelect_AfterUpdate_Error:
If Err.Number = 2501 Then
DoCmd.OpenForm "fGeneralInfoTT", , , "JobNumber=" &
Me!CboJobNumberSelect
Else
MsgBox "Error " & Err.Number & " - " & Err.Description
End If
GoTo CboJobNumberSelect_AfterUpdate_Exit
End Sub
If anyone has any ideas or suggestions, I would really appreciate hearing
from you.
Thanks,
Pam
I have an unbound form 'fTTSwitchboard' that has two combo boxes - one lists
tech names 'CboTech' and the other lists job numbers 'CboJobNumberSelect.
There is also a subform for list of jobs assigned to CboTech. The
JobNumberSelect combo box lets them enter a job number that is not on their
list and a form 'fGeneralInfoTT' opens giving specific about job with a
subform 'fWorkLog' that has a combo box 'CboTech' where they can select their
name and text boxes to enter start and stop times.
Everything works well now, but I would like to tweek it. When the form
'fGeneralInfoTT' opens, I would like the subform 'fWorkLog' to have the
'CboTech' name filled in with the name entered from 'fTTSwitchboard'. I can
make it do this but the problem is if I enter Joe on the first form, I can
open a job and have Joe's name filled in the combo box on the subform of the
second form. I enter start time for Joe, close form and go back to the
switchboard and click on Mike. I select same job for Mike and it will open
with his name, but with Joe's time. I'm not sure what I need to do to get
it to open with a fresh screen for Mike, but at the same time when Joe
selects his name from the switchboard, have it open to his record with the
previous start and empty stop time. I've tried openargs, but couldn't get it
to work. Currently this is what I have.
Private Sub CboJobNumberSelect_AfterUpdate()
On Error GoTo CboJobNumberSelect_AfterUpdate_Error
If IsNull(Forms!fttworkloghiddenopen!StopTime) Then
DoCmd.OpenForm "fTTWorkLogReminder"
End If
DoCmd.OpenForm "fGeneralInfoTT", , , "JobNumber=" &
Me!CboJobNumberSelect
CboJobNumberSelect_AfterUpdate_Exit:
Exit Sub
CboJobNumberSelect_AfterUpdate_Error:
If Err.Number = 2501 Then
DoCmd.OpenForm "fGeneralInfoTT", , , "JobNumber=" &
Me!CboJobNumberSelect
Else
MsgBox "Error " & Err.Number & " - " & Err.Description
End If
GoTo CboJobNumberSelect_AfterUpdate_Exit
End Sub
If anyone has any ideas or suggestions, I would really appreciate hearing
from you.
Thanks,
Pam