Click to See Complete Forum and Search --> : Parsing form field value to query
CodeNemesis
Feb 24th, 2005, 06:42 AM
How to I take the value of my textbox and send it to a query?
ZeBula8
Feb 24th, 2005, 09:54 AM
Dim sTextboxValue As String
Dim sSQL as string
sTextboxValue = TextBox1.Text
sSQL = "SELECT * FROM [yourtable] WHERE [yourField] = ' " & sTextboxValue & " ';"
RobDog888
Feb 24th, 2005, 11:33 AM
You can gain access to any control on your form by using the Forms collection.
Forms![Form1]![txtTextBox1].Value ,etc.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.