Stringing Several Record Values Together (From The Same Field) AndTransferring to A Textbox Control

  • Thread starter nouveauricheinvestments
  • Start date
N

nouveauricheinvestments

Hi,


I have a subform which is among several controls displayed when a user
brings up a specific form. This subform is in datasheet view, and it
could display anywhere from 1 record to several records. For
example's sake, the first field is called 'TicketNumber'. There is an
option at the bottom to open another form as well. When the user
selects this option, another form is opened and I am using the
following code to set the value of a textbox on this form. The
problem is that the following code only gathers the data from the
first record in my subform. I want it to string all of the records
together. How can I do this differently to make it work?

If Form_ViewOpenTickets.NOIMine = "Problem With A Trade" Then
OrderDetails = "Ticket: " & MyForm.TicketNumber & "; " & "SL: " &
MyForm.SL & "; " & "TP: " & MyForm.TP & _
"; " & "Pair: " & MyForm.Pair & "; " & "Entry Price: " &
MyForm.EntryPrice & "; " & "Lots: " & MyForm.Lots & _
"; " & "Close Price: " & MyForm.ClosePrice
End If
 

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