Subform goes blank

G

Guest

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?
 
G

Guest

Ignore (unless you can help!) -- this was mistakenly posted here instead of
Forms Coding.

Chris
 

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

setting focus to 3rd subform 20
Can't assign value 1
set focus 2
Subform: record select form other subform 23
Vis/Invis SetFocus conundrum 2
format combo box 6
.Bookmark = .RecordsetClone.Bookmark 3
Where clause 4

Top