G
Guest
I have searched these forums and not found a solutions that answers my
problem. I have a form with a text box (txtInput) and a Search button
(cmdSearch). I have attached the following code to the "Click" event of the
button.
When I enter a valid ID into the textbox and click the search button I get a
"Parameter Value" dialog box up that I have to re-enter my valid ID into
before the required form opens with the records that match the ID entered.
I don't want the Parameter Value dialog box to open. I want the code to
simply use the value entered into the text box, txtInput, and then open the
desired form with only those records. Can someone tell me where I'm going
wrong please.
txtInput.SetFocus
if not isnull(me.txtInput) then
docmd.OpenForm "frmOutput", , , "CTC_ID = " & txtInput.text
else
msgbox "Nothing Selected"
end if
Many thanks,
Ian.
problem. I have a form with a text box (txtInput) and a Search button
(cmdSearch). I have attached the following code to the "Click" event of the
button.
When I enter a valid ID into the textbox and click the search button I get a
"Parameter Value" dialog box up that I have to re-enter my valid ID into
before the required form opens with the records that match the ID entered.
I don't want the Parameter Value dialog box to open. I want the code to
simply use the value entered into the text box, txtInput, and then open the
desired form with only those records. Can someone tell me where I'm going
wrong please.
txtInput.SetFocus
if not isnull(me.txtInput) then
docmd.OpenForm "frmOutput", , , "CTC_ID = " & txtInput.text
else
msgbox "Nothing Selected"
end if
Many thanks,
Ian.