So here's my problem guys i made a program wherein you can search based on the drop down criteria. Like when i search by first name i can search all records that start with the string i type in the textbox along with the criteria.
All of it is going well till i added a new search called datefrom and dateto, the search is by datefrom to dateto but i don't understand is that when i run the program it will keep telling me that retrieve argument does not match expected type but when you see it clearly it is formatted to datetime so how can it be wrong? And the retrieve agrument matches the datatype im searching so it's hard to trace.
dfrom = date(em_fr.text)
dto = date(em_to.text)
cri = trim(sle_criteria.text)
if ddlb_1.text= "Last Name" then
dw_1.retrieve(cri + '%', ' ',nulldate,nulldate,nulldate, nulldate)
elseif ddlb_1.text= "First Name" then
dw_1.retrieve(' ', cri + '%', nulldate, nulldate, nulldate, nulldate)
elseif ddlb_1.text= "Inquiry Date" then
dw_1.retrieve(' ',' ',datetime(dfrom, 00:00:00), datetime(dto, 23:59:59), nulldate, nulldate)
elseif ddlb_1.text= "Target DOR" then
dw_1.retrieve(' ', ' ',nulldate, nulldate, datetime(dfrom, 00:00:00), datetime(dto, 23:59:59))
end if
so basically last name and first name was fine at 1st but when i added datetime along with search it keeps giving me the error msg does not match.
p.s. those 4 are different searches not at the same time, if ddlb_1.text = Target DOR or Inquiry Date
criteria.text will be invisible and dfrom and dto will become visible hope you guys get my idea need help badly thank you
All of it is going well till i added a new search called datefrom and dateto, the search is by datefrom to dateto but i don't understand is that when i run the program it will keep telling me that retrieve argument does not match expected type but when you see it clearly it is formatted to datetime so how can it be wrong? And the retrieve agrument matches the datatype im searching so it's hard to trace.
dfrom = date(em_fr.text)
dto = date(em_to.text)
cri = trim(sle_criteria.text)
if ddlb_1.text= "Last Name" then
dw_1.retrieve(cri + '%', ' ',nulldate,nulldate,nulldate, nulldate)
elseif ddlb_1.text= "First Name" then
dw_1.retrieve(' ', cri + '%', nulldate, nulldate, nulldate, nulldate)
elseif ddlb_1.text= "Inquiry Date" then
dw_1.retrieve(' ',' ',datetime(dfrom, 00:00:00), datetime(dto, 23:59:59), nulldate, nulldate)
elseif ddlb_1.text= "Target DOR" then
dw_1.retrieve(' ', ' ',nulldate, nulldate, datetime(dfrom, 00:00:00), datetime(dto, 23:59:59))
end if
so basically last name and first name was fine at 1st but when i added datetime along with search it keeps giving me the error msg does not match.
p.s. those 4 are different searches not at the same time, if ddlb_1.text = Target DOR or Inquiry Date
criteria.text will be invisible and dfrom and dto will become visible hope you guys get my idea need help badly thank you