Hi Kirk ----
If I understand this correctly, you could change the the doctor selection poart of the SQL code to:
WHERE (docID = gcDocID) OR ALLT(gcDocID) = "All"
This would work.
>In vfp5 I use a view I tried to put the SQL code here, but I couldn't post the message that has a parameter for beginning date, ending date and select doctor code stored in gcDocID.
>
>The user is presented with a for where they select the date range mq_start,mq_end and select the doctor from a drop down list. The drop down is based off cursor with a list of all the doctors available. Thinking I was smarter than I am, I added a doctor to the drop down called ALL. I placed a space in front of the A so it would be sorted to the top of the list. If the user selects ALL, I thought I would replace the gcDocID with a space and then issue the requery and get all the records. It didn't work for me. Selecting any other doctor, brings up the correct records, but selecting ALL returns 0 records. I'm kinda sure I'm on the right track here, but...I'm not there yet. Any help appreicated.
>
>Kirk
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05