Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    1,611
    You are creating problems for the sake of creating them.
    Problems that would not appear in real life?



    No one with an ounce of sense would have a price as text.?

    I'm all for learning, but that is needless learning. Why not have your text read from right to left instead of the conventional left to right for English and most other languages. That would be a 'learning; experience", but equally useless for the most part?

    Use 0 for any missing price. Presumably you do not give items away?
    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?search_query=debug+access+vba



  2. #17
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,947
    This is becoming more and more involved. Carrying coals to Newcastle.

    Click image for larger version. 

Name:	filter.png 
Views:	15 
Size:	5.9 KB 
ID:	46764

    To copy:

    Code:
    CLng(Nz([Price],0)) Between 1000 And 4000 And InStr(Nz([Price],""),"?")=0

  3. #18
    Jackroland is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    18
    Quote Originally Posted by Micron View Post
    We're good.
    Try

    Clng(Replace(Nz([Price],0),"?","")) Between 1000 And 4000

    unfortunately it gives me an error
    "Invalid Where condition argument value for Apply Filter macro action"

  4. #19
    Jackroland is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    18
    Quote Originally Posted by davegri View Post
    This is becoming more and more involved. Carrying coals to Newcastle.

    Click image for larger version. 

Name:	filter.png 
Views:	15 
Size:	5.9 KB 
ID:	46764

    To copy:

    Code:
    CLng(Nz([Price],0)) Between 1000 And 4000 And InStr(Nz([Price],""),"?")=0

    it gives me an error
    "Invalid Where condition argument value for Apply Filter macro action"


    doesn't he give you the same error? you notice it immediately after typing, a red exclamation point appears to the left of Where
    i'm sorry... it seemed an excellent solution to see it written like this

  5. #20
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    10,143
    I think you should copy your db, compact/repair the copy, zip it and post here. What I wrote works in the immediate window where my data is null or contains a ? character. I suspect Davegri's version worked as well. We've passed 19 posts now for what should be a fairly simple problem. Since this is just a learning exercise (as you mentioned) there won't be sensitive data to worry about?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #21
    Jackroland is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2021
    Posts
    18
    Quote Originally Posted by Micron View Post
    I think you should copy your db, compact/repair the copy, zip it and post here. What I wrote works in the immediate window where my data is null or contains a ? character. I suspect Davegri's version worked as well. We've passed 19 posts now for what should be a fairly simple problem. Since this is just a learning exercise (as you mentioned) there won't be sensitive data to worry about?

    you are right, in fact it would be much easier for me to post the DB directly in my opinion you would solve my problem in 5 minutes. The problem is ... I'm not allowed to post it, even if it's a simple exercise in learning. Unfortunately...

  7. #22
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    10,143
    Then make up something of your own that you'd be allowed to post? It only needs to contain the minimum to replicate the issue and the data can be anything - like Disney character names - as long as your copy has the same problem. In the meantime, best not to quote what you were given as a suggestion and say it doesn't work. Post your version. There could be one missing comma or something as simple as that.

    EDIT - That error message might mean you are using the wrong macro command. Try ApplyFilter instead but leave the filter name parameter blank.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #23
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    2,947
    There may be a lingering bad filter string here. Clear it out and try my post# 17 again.

    Click image for larger version. 

Name:	filterclear.png 
Views:	16 
Size:	28.9 KB 
ID:	46765

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 06-17-2015, 12:20 PM
  2. Command Button to Run Macro, can't find macro
    By Ace2014 in forum Modules
    Replies: 22
    Last Post: 06-11-2014, 11:42 AM
  3. MACRO to filter
    By DAE60 in forum Programming
    Replies: 1
    Last Post: 11-13-2012, 02:10 PM
  4. Replies: 28
    Last Post: 03-08-2012, 06:47 PM
  5. Replies: 0
    Last Post: 01-12-2011, 12:43 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