Click on item to populate text box (1 Viewer)

Derrick T. Davidson

Registered User.
Local time
Tomorrow, 03:34
Joined
Jan 31, 2016
Messages
15
My second post as the first was so good:

I have a form [frmSuppliers] containing a sub form [frmItem] and a text box [Item].

When the suppliers name is entered the sub form appears with a list of items provided by the supplier [txtSupItem].

What I would like to do is click on an item in the subform list [txtSupItem] and the item I click will populate the txt box [frmItem] in the main form [frmSuppliers]

My code experience is limited so I am unsure if this is possible?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:34
Joined
May 7, 2009
Messages
19,246
use double-click event instead.
on any control on your subform, say Control1, code the double click event:

private sub Control1_DblClick(Cancel As Integer)
Me.Parent!yourCotrolInMainForm.Value = Me!Control1.Value
End Sub
 

Derrick T. Davidson

Registered User.
Local time
Tomorrow, 03:34
Joined
Jan 31, 2016
Messages
15
You are sooooo good man thank you
 

Users who are viewing this thread

Top Bottom