troubleshooting Question

Populate text box with selections in a datasheet subform

Avatar of SteveL13
SteveL13Flag for United States of America asked on
Microsoft Access
10 Comments2 Solutions83 ViewsLast Modified:
I want to populate a text box on a main form with entries and selections from a datasheet subform.  The datasheet subform looks like this:

Quantity                            Object
1 (entered value)             Football (selected object from combobox)
4 (entered value)             Baseball (selected object from combobox)
etc.                                     etc.

I have this code which works for one row entry/selection in the datasheet:

Private Sub Form_AfterUpdate()

    Me.Parent.txtOjectDefinition = Me.txtQuantity & " " & Me.cboObject.Column(1)

End Sub

But if I were to select the 2nd row in the datasheet followed by the first row, I want the text box on the main form to look like this:

4 Baseball + 1 Football

(note the + mark between the selections)

How can this be done?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros