How to pass data to a subform from a continuous form?

  • Thread starter Thread starter Aldred@office
  • Start date Start date
A

Aldred@office

Hi all,
I have searched the title "continuous" and found nothing before I post this
question. In case this was answered before, I am sorry about that and
please redirect me to that answer.

I have a form which has a continuous subform in it. And I'd like to have
another subform popup up (Modal) when the user clicked on the button which
is associated with the record in the conitnuous form. The data will be
transfered to the popped up subform for further processing.

Can someone please show me how could I achieve this?

Thanks.
 
Aldred@office said:
Hi all,
I have searched the title "continuous" and found nothing before I post
this question. In case this was answered before, I am sorry about that
and please redirect me to that answer.

I have a form which has a continuous subform in it. And I'd like to have
another subform popup up (Modal) when the user clicked on the button which
is associated with the record in the conitnuous form. The data will be
transfered to the popped up subform for further processing.

Can someone please show me how could I achieve this?

I often do this by placing a button also on the contineus form detail line.
The code behind the buttion looks like:

docmd.openForm "frmViewDetails",,,"id = " & me!id

Here is some sceen shots where you often see a "button" in the continues
form, and the code behind that button is as above.

note that if you allow editiong in the continues sub-form, then you MUST
force a disk write before you launch that details form.

So, if you allow editing of data in the sub-form, then you need the
follwoing code t open the form:
if me.Dirty = true then
me.Dirty = false
end if
docmd.openForm "frmViewDetails",,,"id = " & me!id

As for the model setting, your find that option in the "other" table of the
properites sheet for the form (and, it is a good idea to open this form as
model).
 
sorry..bumped send key...

I often do this by placing a button also on the continues form detail line.
The code behind the button looks like:

docmd.openForm "frmViewDetails",,,"id = " & me!id

Here is some screen shots where you often see a "button" in the continues
form, and the code behind that button is as above.

http://www.members.shaw.ca/AlbertKallal/Articles/Grid.htm

Note that if you allow editing in the continues sub-form, then you MUST
force a disk write before you launch that details form.

So, if you allow editing of data in the sub-form, then you need the
following code to open the form:

if me.Dirty = true then
me.Dirty = false
end if
docmd.openForm "frmViewDetails",,,"id = " & me!id

As for the model setting, your find that option in the "other" table of the
properties sheet for the form (and, it is a good idea to open this form as
model).
 
Thanks Albert and sorry for the late reply. I was out of the office for
four days. I will try it out.

Thanks again for you help.
 
Back
Top