Results 1 to 5 of 5
  1. #1
    vipa2000 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2022
    Posts
    10

    Wink Query displaying fields it should have hidden

    Set-up a query as per screen shots with this forums help. I have set-up a parameter to ask for a number. When I enter zero all records brought back and it appears ok. However, if I enter 11 I notice values of 8 are being retrieved. Tried googling known issues and looking at the SQL code (looks ok but I don't code) but no joy. Thanks in advance.
    Click image for larger version. 

Name:	query.jpg 
Views:	21 
Size:	45.0 KB 
ID:	48716Click image for larger version. 

Name:	8 displayed.jpg 
Views:	21 
Size:	28.4 KB 
ID:	48717Click image for larger version. 

Name:	sql.jpg 
Views:	21 
Size:	18.5 KB 
ID:	48718

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    Firstly, it is records it should not retrieve.
    Perhaps it is treating values as text?
    Try putting val() around your criteria prompt.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    If your field has any Leading or Trailing spaces you would need to remove those with the Trim() function. Something like:

    Expr1:len(Trim([HOG].[Functional Loc]))
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,861
    I cannot replicate your issue?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    vipa2000 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2022
    Posts
    10
    Thanks Welshgasman. Perfect.

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

Similar Threads

  1. Only displaying non-null fields in query??
    By skier4life in forum Queries
    Replies: 1
    Last Post: 06-24-2013, 08:53 AM
  2. Replies: 1
    Last Post: 09-15-2011, 08:45 AM
  3. Replies: 0
    Last Post: 01-18-2011, 07:09 AM
  4. Replies: 3
    Last Post: 11-24-2010, 09:50 PM
  5. question about hidden fields and checkboxes
    By Nokia N93 in forum Access
    Replies: 2
    Last Post: 11-22-2010, 07:31 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