Results 1 to 4 of 4
  1. #1
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150

    refering a field in a form as criteria in a query problem

    Hi,



    I just could not figure it out. I am using this criteria in a query below"

    Like "Forms!Form1!Text0*"

    is that correct format? I dont know if that is correct because there is no result when I run the query.

    I am using in my search form. Moreover, what event procedure should I use so that everytime I input a letter in my search field, the result in my subform will requery or get updated?

    Thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I think you can just loose the quotes.
    Like Forms!Form1!Text0*
    or maybe
    Like " & Forms!Form1!Text0 & "*

  3. #3
    marianne is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Asia Pacific Region
    Posts
    150
    thanks for the reply RG. i found my criteria and its Like [Forms]![Form1]![Text0] & "*"

    anyway can you tell me what event procedure should I use that when I enter every single letter on my criteria textbox, my subform will get requery or updated? thanks.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Use the AfterUpdate event of the TextBox which will fire when you move the focus to another control after making a change in the TextBox.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. query - criteria based on another row field value
    By techexpressinc in forum Queries
    Replies: 1
    Last Post: 05-29-2009, 04:17 PM
  2. Setting criteria in a calculated date field
    By SteveReberger in forum Access
    Replies: 0
    Last Post: 10-29-2008, 06:58 AM
  3. Replies: 0
    Last Post: 02-09-2007, 09:20 AM
  4. Form field not displaying in query
    By Valeda in forum Queries
    Replies: 2
    Last Post: 05-05-2006, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums