Select & textbox

  • Thread starter Thread starter David8
  • Start date Start date
D

David8

Hi,
I've a textbox in a form whit a vale, the name of the text box is T1
I must to do a query where the crriteria is the textbox, i think kike this:
SQL = "SELECT ID, DATE FROM TABLE WHERE ID =' & T1 ' "
Where is the problem?
Thanks for the solution.
Best regards from Barcelona.

David8.
 
You need to set T1 as a Form variable on the page receiving the form

<%
T1 = RequestForm("T1")
SQL = "SELECT ID, DATE FROM TABLENAME WHERE ID =' & T1 & " ' "
%>

or

<%
SQL = "SELECT ID, DATE FROM TABLENAME WHERE ID =' & RequestForm("T1") & " ' "
%>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Hi,
| I've a textbox in a form whit a vale, the name of the text box is T1
| I must to do a query where the crriteria is the textbox, i think kike this:
| SQL = "SELECT ID, DATE FROM TABLE WHERE ID =' & T1 ' "
| Where is the problem?
| Thanks for the solution.
| Best regards from Barcelona.
|
| David8.
 
Back
Top