From an Access form, is it possible to send the contents of a text box as a variable in a query? If so, this is it with the code or should I directly put some criteria into the query?
From an Access form, is it possible to send the contents of a text box as a variable in a query? If so, this is it with the code or should I directly put some criteria into the query?
It is quite possible to save the contents of a text box as a criterion in a SQL query.
Example: UPDATE req SET num_req = '" & txtNum & "' where id_req = " & txtId
Here of course, txtid and txtnom are text box.
Here is the syntax:
Forms is a Keyword Access to write unchanged.Code:[forms]![NumForm]![NumField]
NumForm: refers to the collection of forms
Let's say I use a text box and the name of the text box is "Text19", I added to test
[forms] [SearchContacts1] [Text19]
but this always asks me to add the value even though my text box is not empty.
Can anyone help me please?
What is your "Where" clause?
Normally, it should be like: Like "*" & [form] [SearchContacts1] [Text19] & "*"
Bookmarks