Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy a field from subform

Status
Not open for further replies.

dead7

Programmer
Jun 8, 2004
79
0
0
US
I have a button on the main form and want to onclick goto the subform and copy the first record or the row that is selected, lets call it 'recon#'. There are other fields in the row But I only want to copy the first record that is selected.

I have this but its not working right
FORMS![FRMCLAIMCAPTURE]![frmArgumentClaimLine_subform]![recon#]. I have it a macro to gotocontrol the runcommand copy
 
What do you mean by
' lets call it 'recon#'
In what sense does a record have a name?

It would always be 'the row that is selected' as there is always a row selected (assuming a row exists)
And you want to copy it where? to the clipboard?
 
I am also not sure what you want to do, but at a minimum you are referencing a control on a subform incorrectly. There is a FAQ on this and you can get information from the help file or Microsoft site:

form![formName].controls![subformControlName].form.controls![control onsubformName]

you can drop controls since it is the default object of a form

form![formName].[subformControlName].form.[control onsubformName]

The key is to return the form that exists within the subform control "[subformControlName].form".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top