Form based on a Query (1 Viewer)

durdle17

Registered User.
Local time
Today, 09:17
Joined
Feb 21, 2003
Messages
28
Hi,

I have form created(frmsearch) based on a query(qrysearch) which searches based on partial last name. For example when you run the query it asks the user for Partial Last Name, so when you type "smi" it returns two values on the form smith, john & smith, kathy.
And on this form next to each returned record, in this case "two" , is a command button(cmdplaceit).
When the user clicks on the button, I want a field on the form(txtname) corresponding with the button pressed, returned to another text box on frmmain.
Does anyone have any ideas how I can set this up?

thanks all
 

Jack Cowley

Registered User.
Local time
Today, 09:17
Joined
Aug 7, 2000
Messages
2,639
This code in the On Click [Event Procedure] of the button should do it...

Me.Parent.NameOfControlOnMainForm = Me.txtname

hth,
Jack
 

durdle17

Registered User.
Local time
Today, 09:17
Joined
Feb 21, 2003
Messages
28
Thanks.
 

Users who are viewing this thread

Top Bottom