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

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.
 
A

Albert D. Kallal

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).
 
A

Albert D. Kallal

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).
 
A

Aldred@office

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.
 

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

Top