C
Chris
Please help me figure this out!
My user has a main client form with multiple job subforms.
On client selector's onNotInList event, the user is presented with a new
client entry form popup.
On closing the client entry form, the user returns to the main client form
(the new client) and a job (on the subform) has been started -- assigned an
ID number and the date entered.
The tables are related, cascading updates/deletes, one client-many jobs.
Here is code excerpted from popup new client entry onClose event:
Forms![frm1 Client].Form![Jobfrm].SetFocus
Forms![frm1 Client].Form![Jobfrm].Form!InvNum = DMax("InvNum", "tbl 2 Job")
+ 1
Forms![frm1 Client].Form![Jobfrm].Form!EnterDate = Date
Forms![frm1 Client].Form![Jobfrm].Form!txtStartDate = Date + 1
Forms![frm1 Client].Form![Jobfrm].Form!txtEndDate = Date + 1
Forms![frm1 Client].Form![Jobfrm].SetFocus
Forms![frm1 Client].Form![Jobfrm].Form!txtholdFocus.SetFocus
When user returns to the main client form for the new client there is a job
.... it has InvNum and entry date. They complete the job subform and via a
"post" button accept the record. "Post" does nothing more than closes the
controls to edit.
My problem?
The above works fine if I close the program (not good), but when I try to
add another new client's job in the same session, the subform is blank.
Moving from view to design I get the message that a record is required in the
job table.
I suspect that I need to save or requery, but I cannot seem to find out
exactly where and attempts are so far fruitless. Does anyone have any
insight, or suggestions to offer?
My user has a main client form with multiple job subforms.
On client selector's onNotInList event, the user is presented with a new
client entry form popup.
On closing the client entry form, the user returns to the main client form
(the new client) and a job (on the subform) has been started -- assigned an
ID number and the date entered.
The tables are related, cascading updates/deletes, one client-many jobs.
Here is code excerpted from popup new client entry onClose event:
Forms![frm1 Client].Form![Jobfrm].SetFocus
Forms![frm1 Client].Form![Jobfrm].Form!InvNum = DMax("InvNum", "tbl 2 Job")
+ 1
Forms![frm1 Client].Form![Jobfrm].Form!EnterDate = Date
Forms![frm1 Client].Form![Jobfrm].Form!txtStartDate = Date + 1
Forms![frm1 Client].Form![Jobfrm].Form!txtEndDate = Date + 1
Forms![frm1 Client].Form![Jobfrm].SetFocus
Forms![frm1 Client].Form![Jobfrm].Form!txtholdFocus.SetFocus
When user returns to the main client form for the new client there is a job
.... it has InvNum and entry date. They complete the job subform and via a
"post" button accept the record. "Post" does nothing more than closes the
controls to edit.
My problem?
The above works fine if I close the program (not good), but when I try to
add another new client's job in the same session, the subform is blank.
Moving from view to design I get the message that a record is required in the
job table.
I suspect that I need to save or requery, but I cannot seem to find out
exactly where and attempts are so far fruitless. Does anyone have any
insight, or suggestions to offer?