Page 2 of 5 FirstFirst 12345 LastLast
Results 16 to 30 of 64
  1. #16
    June7's Avatar
    June7 is online now VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    If you don't want records where date field Is Null then why do you include that in search criteria? Did you review the Allen Browne article I posted link for in post 6?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  2. #17
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,570
    If you respond to post #14, all Mike will do is go to another site and ask how to do it. :-(
    That is his modus operandi.
    Then we have a middleman who has no clue as to what the original person is requesting. Plus noone gets any benefit with the PMs :-(
    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. #18
    guest is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    61
    As i said before I fixed it for now. This database is based on document form and should look like one. i follow the rules for populating the document how it should be populated so i cant change some things. i am aware that many things can be improved shortened or added but for now i am happy that it works. it help me the most for finding documents.

  4. #19
    guest is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    61
    Hi Mike,
    Thanks for your help. Soryy I cant upload a copy there is confindental data i cant offer publically but I can answer any question or i dont know maybe empty sample of table or something like that. write me if that is ok.

  5. #20
    guest is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    61
    Hi June7
    For example one the date fields is empty all year and at end of the year when data is collected data is populated so it is not empty anymore. but over the year it is empty and if is null omitted from the searching so other data from that record form other fields is also omitted, that why i used null field too to have data from all records. as I said i don't know vba or something so i do it in the simplest way as i know to do.

  6. #21
    June7's Avatar
    June7 is online now VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Your narrative seems contradictory and confusing. Not clear to me what you want. If field is null, do not retrieve record? Which is what you seem to accomplish by using dummy date. What is not clear to me is why simply excluding Or Is Null from criteria doesn't get what you expect.

    Yes, can make copy of database then change confidential data to dummy values. However, if db is non-English, could be difficult to analyze.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #22
    guest is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    61
    I will give example and hope show you what i mean. let say i have two records. every record has three fields. one field is data field. there are combo boxes for each field. when form is opened subform is populated with all records (two) and then i can search with one or more combo boxes. if one record contain empty date field subform will open populated only with one record no both (record that contain emptu date field will be omitted). in that way i will miss data from missing record. that data will not be searched no matter which combo box i choose. that why i need date field to have some value. I don't know how to get both records if data field is empty. i will make copy and change to english later.

  8. #23
    June7's Avatar
    June7 is online now VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    You mean "date" field, not "data" field.

    Okay, think I am understanding now. I don't normally use dynamic parameter query. I use VBA to build filter criteria, hence the link I posted.

    I also don't use macros so not sure how yours plays into this issue. I never use [Screen].[ActiveControl].

    You never have shown your complete SQL statement and all 3 criteria. Are you using AND or OR? OR works for me without dummy value for null date field.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #24
    guest is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    61
    Here is the database. delete date of receiving to see the difference. there are two records entered. Search.zip

  10. #25
    June7's Avatar
    June7 is online now VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    You provided a 64-bit version of accde. I run 32-bit Access so cannot open this db.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #26
    guest is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    61
    Sorry I don't know how to convert it to 32-bit but thanks anyway.

  12. #27
    June7's Avatar
    June7 is online now VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Provide the accdb version.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #28
    guest is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    61
    here i send it again in accdb version. Search.zip

  14. #29
    June7's Avatar
    June7 is online now VIP
    Windows 11 Access 2021
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Don't see need for main form to even have RecordSource.

    Table will not allow 1-1-1900 because of ValidationRule. So exactly how did you use 1/1/1900 - calculate with Nz() in query? I tried that and embedded macro errors.

    I am now back to confused. I added a record that does not have DateOfReceipt and has different Mark. I tried filtering on just BasicNumber and Mark criteria. The Mark criteria doesn't work - all records return.

    Oh well, as long is it all works to your satisfaction...
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #30
    guest is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Dec 2024
    Posts
    61
    forget to delete validation rule when translating. i send you new version with deleted validation rule. mark can be different for each record. try now and you will see it works if not empty date field (work with 1-1-1900 too). if there is record with empty field that record is added to every search. Search.zip

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

Similar Threads

  1. Replies: 3
    Last Post: 01-25-2024, 02:46 PM
  2. Replies: 2
    Last Post: 04-15-2017, 11:09 AM
  3. Replies: 3
    Last Post: 09-12-2016, 11:49 AM
  4. Replies: 3
    Last Post: 09-02-2013, 04:33 PM
  5. Search form getting wrong results
    By Ruegen in forum Programming
    Replies: 1
    Last Post: 08-22-2013, 06:32 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