Results 1 to 5 of 5

Thread: Help in Access query

  1. #1
    Join Date
    Nov 2008
    Posts
    1,221

    Help in Access 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?

  2. #2
    Join Date
    May 2008
    Posts
    271

    Re: Help in Access 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.

  3. #3
    Join Date
    Feb 2008
    Posts
    194

    Re: Help in Access query

    Here is the syntax:

    Code:
    [forms]![NumForm]![NumField]
    Forms is a Keyword Access to write unchanged.
    NumForm: refers to the collection of forms

  4. #4
    Join Date
    Nov 2008
    Posts
    1,221

    Re: Help in Access query

    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?

  5. #5
    Join Date
    Feb 2008
    Posts
    194

    Re: Help in Access query

    What is your "Where" clause?

    Normally, it should be like: Like "*" & [form] [SearchContacts1] [Text19] & "*"

Similar Threads

  1. Pass query in design mode in Access 2007
    By Chandranath in forum Windows Software
    Replies: 5
    Last Post: 08-01-2010, 06:45 AM
  2. Create batch file to run access query
    By DeMario in forum Software Development
    Replies: 5
    Last Post: 31-12-2009, 04:44 AM
  3. How to run Query Automatically on MS Access
    By Rixwel in forum Software Development
    Replies: 3
    Last Post: 18-08-2009, 10:24 AM
  4. Limit Rows Returned In Access Query
    By NetWorm in forum Software Development
    Replies: 4
    Last Post: 25-02-2009, 10:32 PM
  5. Excel function calculations used in MS Access query
    By akbar in forum MS Office Support
    Replies: 1
    Last Post: 23-05-2008, 08:52 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,295,051.00786 seconds with 17 queries