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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transferring record information

Status
Not open for further replies.

Daff

IS-IT--Management
Jun 19, 2001
4
NZ
What is the best way to transfer record information from one form to another?

Say a form is displaying the results of a query, and there are multiple records (eg products). A command button is clicked to select a certain record, and form is closed, and the record copied or transferred to another form which would be part of an order.
 
Daff

If I understand you correctly, you could create a list box based on you query. The results would then appear within the list box and you could then add a command button which would append the information highlighted in the list box to the fields of you choice.

Forms![FormName].[FieldName1] = ListBox.Column(0)
Forms![FormName].[FieldName2] = ListBox.Column(1)
Forms![FormName].[FieldName3] = ListBox.Column(2)
Forms![FormName].[FieldName4] = ListBox.Column(3)

etc.....

Refer to the data that you want to put in your form in the ListBox by the Columm Number left to right.

You could put such code in to OnDoubleCLick Event in the list box properties.

Let me know if this is of any help.

Lloyd Gozzett
Process Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top