Form + 2 subforms

A

arbuzas

Hi,

I have form with 2 subforms (subform1 and subform2)

subform2 depends on data on subform1 ... it's something like records
(subform1) and comments (subform2). So, I must pass record_id from
subform1 to subform2.

I'm trying to write event for subform1 (onCurrent) ... something like
subform2.controlname.value = me.record_id. Unfortunately, such syntax is
invalid. Could you help me with it? :)

P.S. The point is that I must pass value from subform1 to subform2 not
vice versa.

Thanks for your help.
 
J

Joe

I just did something similar.

The record source of subform 2 has the criteria in the query from the
primary key of subform1.
[Forms]![frmMain]![subform 1].[Form]![PrimaryKey]

Then in the Current event of subform1: Forms![frmMain]![subform2].Requery.
 
G

Guest

Insert a textbox on the main form with its value set to the current record in
the primary subform, then link the secondary subform's child field to the
name of the textbox on the primary form.
Bill Heineke
 

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