W
WSF
I have read the Help file and searched Google and Access sites for info
on this problem, but still cannot get it to work.
Firstly I a job info form (Pop-up - Modal-No, Has Module - Yes). In that
form there may be a reference to a previous job, in a text box
[txtPreviousJobNo] (if no previous it reads "0").
By double clicking that text box (where it holds a valid previous job
number) I want to open a second instance of the same form with the data
of the previous job.
The first instance of the JobInfo Form is bound to the master data table
and is initially opened from another main form by:
DoCmd.OpenForm "frmJobInfo", , , "JobsNo = " & Me!txtJobNo
where [Me!txtJobNo] is a current job number. That works fine.
Then I have:
Public PreviousJobNo As Integer
Public frmMulti As Form
declared in a separate Module
In the [txtPreviousJobNo]text box in the JobInfo form Double-Click event
I am trying:
Set frmMulti = New Form_frmJobInfo
frmMulti.SetFocus
This opens the second instance of the form - great, but - it displays
the data from the first record of the master data table.
How can I have the second instance display the data based on the job no
in the [txtPreviousJobNo] text box? Then I have two forms open each
displaying the current and the previous job?
I have read of the implication's of using multiple instances of forms,
closing them etc., but have my own ideas on handling that assuming I can
get them to open correctly for me in the first place.
TIA
WSF
on this problem, but still cannot get it to work.
Firstly I a job info form (Pop-up - Modal-No, Has Module - Yes). In that
form there may be a reference to a previous job, in a text box
[txtPreviousJobNo] (if no previous it reads "0").
By double clicking that text box (where it holds a valid previous job
number) I want to open a second instance of the same form with the data
of the previous job.
The first instance of the JobInfo Form is bound to the master data table
and is initially opened from another main form by:
DoCmd.OpenForm "frmJobInfo", , , "JobsNo = " & Me!txtJobNo
where [Me!txtJobNo] is a current job number. That works fine.
Then I have:
Public PreviousJobNo As Integer
Public frmMulti As Form
declared in a separate Module
In the [txtPreviousJobNo]text box in the JobInfo form Double-Click event
I am trying:
Set frmMulti = New Form_frmJobInfo
frmMulti.SetFocus
This opens the second instance of the form - great, but - it displays
the data from the first record of the master data table.
How can I have the second instance display the data based on the job no
in the [txtPreviousJobNo] text box? Then I have two forms open each
displaying the current and the previous job?
I have read of the implication's of using multiple instances of forms,
closing them etc., but have my own ideas on handling that assuming I can
get them to open correctly for me in the first place.
TIA
WSF