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

Using variable for control in function

Status
Not open for further replies.

baronvont

Technical User
May 15, 2001
77
AU
I am trying to use a variable to test if a use has pressed shift on a control.. that part is all well, but I need to know which control will be affected. The function carries the control name into it under the variable 'Ref'. How do I use this to get the value from the referenced control?

(This doesn't work!)

Function GetSearch(Ref As String)

Dim strInput As String, strFilter As String


If SecondFunction = 1 Then ' If shift has been pressed
strInput = Forms![F Job]!Ref.Value
Else
..............
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top