Updating a Field by Selecting a Record in a Subform

G

Guest

Hi,

I have a subform in my mainform which displays a list of tasks to be started.

When a user clicks a record in the subform via the record selector, I have a
pop up form that is displayed and gives the users some options to change
within that record (such as started, completed, cancelled etc).

What i would like to know is from a pop up form, how do I work out what
record is selected in the sub form and make change(s) to fields for the
particular record that is selected?

Thanks,
GLT.
 
A

Alex Dybenko

Hi,
you can pass reference of a form with record to popup form, then you can
refer to fields of current record of this form. You can also look at
calendar example at www.pointltd.com - it uses similar technique
 
G

Guest

Hi Alex,

Thanks for your response. I thought it would be something linke this:

From Pop-Up form:

1) Do a recordset.clone and advance to the same record number that is
selected in the Sub-Form
or
1) Do a recordset.clone and search for the unique record id of the record
selected in the Sub-form

2) Change the particular field status in the recordset and save

Problem is how does the Pop-up form work out which record is selected in the
Subform?
 
A

Alex Dybenko

Hi,
if you pass a reference of subform to popup - then you can easy access
current records like:

frm("Field1")=sometihng
you can also access recordsetclone and set it to current record:

frm.recordsetclone.bookmark=frm.bookmark
 

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