Record Selecting

G

Guest

I have a continuous subform that I have filtered by a combo box. When I make
a selection from my combo box the record selector goes to that specific
record. If I wanted to use that specific record in a calculation on my form,
how would I go about this? I have an unbound control on my form that I want
to use but I only want it to use the record that I selected.
 
A

Albert D.Kallal

On the main form, you can use any value from the current record in the
sub-form like

me.MySubFormControl.form!NameOfField
 
G

Guest

Try

In the textBox write
=[SubFormControlName].Form![FieldName] +
[SubFormControlName].Form![Field2Name]

Or

On the OnCurrent event of the subform write
Forms![MainFormName]![TextFieldName] = Me.[Field1] + Me.[Field2]
 
G

Guest

That worked perfectly. I didn't realize I could do a simple calculation and
it would automatically use the field that was selected. Thanks for your help!

Ofer said:
Try

In the textBox write
=[SubFormControlName].Form![FieldName] +
[SubFormControlName].Form![Field2Name]

Or

On the OnCurrent event of the subform write
Forms![MainFormName]![TextFieldName] = Me.[Field1] + Me.[Field2]

--
\\// Live Long and Prosper \\//
BS"D


Secret Squirrel said:
I have a continuous subform that I have filtered by a combo box. When I make
a selection from my combo box the record selector goes to that specific
record. If I wanted to use that specific record in a calculation on my form,
how would I go about this? I have an unbound control on my form that I want
to use but I only want it to use the record that I selected.
 

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