Results 1 to 3 of 3
  1. #1
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581

    Trying to change a list box with a text field

    I have a list box [lstDeptEquip]. I also have an unbound field [txtAmount]. I want the list box to update with the cost to be equal to or greater than the number [txtAmount]. I used this statement in the list box: SELECT [EquipID], [UTIDNumber], [SerialNumber], [EquipDesc], [EquipCost], [CurrentLoc] FROM qryEquipmentInv WHERE OutOfInv = False and EquipTypeID <> 22 and EquipTypeID <> 23 and EquipTypeID <> 24 and CategoryID <> 2 and DeptOwned and Not(Not Isnull(ReturnedDate) and Issued) and [EquipCost] >= Val(Forms!frmEquipDeptInv!txtAmount) ORDER BY [UTIDNumber];


    It is ignoring the [EquipCost] >= Val(Forms!frmEquipDeptInv!txtAmount) completely. I’m not sure what I’m doing wrong.

  2. #2
    Minty is online now VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    You would need to refresh/requery the list box after updating the txtAmount control, being unbound it won't "know" it's value has changed.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    UT227 is offline Expert
    Windows 7 32bit Access 2013 32bit
    Join Date
    Feb 2016
    Posts
    581
    Thanks. That was a simple fix. Works fine now.

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

Similar Threads

  1. Replies: 8
    Last Post: 12-13-2017, 10:38 AM
  2. Replies: 7
    Last Post: 07-01-2017, 01:07 AM
  3. Replies: 21
    Last Post: 02-16-2017, 03:14 PM
  4. Replies: 3
    Last Post: 02-28-2015, 06:52 PM
  5. Change Text field to Memo Field in a Query
    By Yarbz in forum Queries
    Replies: 5
    Last Post: 06-28-2012, 05:24 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