Select & textbox

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.
 
S

Stefan B Rusynko

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Error DBRW 1
Acces & SQL Server 1
Query and textbox 5
Record -1 year 2
DSum & Dates 7
SQL subquery not working in FP 2003 5
Ado add an id variable to a table 1
rank in select query not right 1

Top