Results 1 to 3 of 3
  1. #1
    jmshipe is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    4

    Need to Filter Query with textbox

    Okay, so I know this sounds easy, but for some reason I'm having alot of trouble working this out. I've looked for the answer on other posts, but nothing has worked.

    I have a form with a text box ("txtbox1"). When this number is updated with the update function I want it to filter a query WHERE [Field] = "txtbox1" value.

    The query is displayed in a subform. It draws its information from one table.

    My code is a mess right now so I won't post it. I can answer any questions though.

    Thank You

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    When this number is updated with the update function
    What is this "update function"?

    Is the main form bound to a table or query?

    How are you triggering the subform to be requeried when the value is "updated" in the textbox?

    Generally you have to physically enter a value in the text box before any of the events are triggered. Just changing it via code will not trigger any textbox events.

  3. #3
    dreday's Avatar
    dreday is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Posts
    58
    try: WHERE [Field] = " & txtbox1 or WHERE [Field] = " & me.txtbox1

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

Similar Threads

  1. Replies: 17
    Last Post: 02-08-2012, 10:06 AM
  2. Replies: 1
    Last Post: 12-04-2011, 06:33 PM
  3. Replies: 5
    Last Post: 08-11-2011, 05:38 PM
  4. using textbox with In () in query
    By TheShabz in forum Forms
    Replies: 4
    Last Post: 04-10-2010, 12:00 PM
  5. Replies: 1
    Last Post: 02-04-2010, 01:15 PM

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