>>>Try CStr() function, I am almost sure that this function returns Date in some format as string but not exactly as DTOS()
>>>
>>>select * from Visits inner join Doctors where patient_name + CStr(date) in (select patient_name + CStr(date) from ...
>>>
>>>I'll keep digging :-)
>>
>>I could not find cStr function in HELP. Typing cStr doesn't bring anything. Same for the format function. I had the same recollection about cStr.
>
>Just try it :-) It is in VB help for Office applications. Access HELP is everithing but helpful :o)
>Put
>
>MsgBox CStr$(Date) in some module and see if it runs.
Right. I know it's in VBA help but I didn't dig that far. Meanwhile my colleague confirmed, that the query worked great. Now he needs some explanation why it works.
That's what I sent him, may be you can phrase it better:
We need to select patient + date where patient + date are in the result. E.g. we are doing two selects. The inner select filters the data using group by and having and the outer select brings the rest of the data.
If it's not broken, fix it until it is.
My Blog