adding date range to multi-criteria search form (access) - Microsoft Community


going start out saying i'm teaching myself access ground , i'm new all. anyways, have multi-criteria search form add date range to. can enter date in search box if know more wont have date, month sent need add date range

i'm using this page base code, , part form , query set same. theres downloadable sample database in link. i've added daterangestart , daterangeend text boxes form , attempted mimic code in query criteria make similar "between [enter date] , [enter date]' statement points text boxes breaks query , returns 0 results. other sites i've been able find touch on involve sql code , thats out of league atm since i'm beginning grasp visual basic. *edit* if makes difference date range boxes arent mandatory if didnt input date still show results not filtered date.*

if please take @ linked database , tell me how add date range criteria column didnt break existing functions appreciate it. thank much!

using form solicit parameters right way go. need explicitly refer form in query! rather between expression use criterion like

>= nz([forms]![yourform]![daterangestart], #1/1/100#) , <= nz([forms]![yourform]![daterangeend], #12/31/9999#) 

to (access' limited version of) "forever" if no date entered.



Office / Access / Microsoft Office Programming / Office 2016



Comments

Popular posts from this blog

Getting ErrorCode: 120018 when trying to access Microsoft account - Microsoft Community

The message was sent to a distribution list ‎(DL)‎ - Microsoft Community

Activation Error 0x8004FE93 - Microsoft Community