Thanks Anthony. I saw that weird question mark thing after I did the Excel query add parameter. It's not Access and it's not SQL and it's not Oracle - guess every "language" has to be different. The first thing I did of course was checkmark the prompt to use the same criteria for future queries. I thought it would be just for that session but the next time I launched the query the only option was the same date I'd already used. I didn't know how to get out of it but lucky me I'd saved the SQL so all I did was cut/paste then recreate the criteria prompt for date. Quick fix. The good news is I have something that works. After these many months of abject failure it feels rather good. g -----Original Message----- From: Colli, Anthony G [mailto:Anthony.Colli@xxxxxxx] Sent: Monday, December 02, 2002 4:47 PM To: 'mso@xxxxxxxxxxxxx' Subject: [mso] Re: Excel-Microsoft Query /g You might try this. View the query in MS query. Press the Show/Hide criteria button, the criteria grid will appear. Select your column and in the criteria place [enter date]. Run the query using !, it should prompt you for the criteria. I just did something similar and this is the query syntax that was generated using MS SQL Server2K as the database. SELECT BD_Info.BD_IDNO, BD_Info.DateRcvd, BD_Info.ClinicID FROM MESA.dbo.BD_Info BD_Info WHERE (BD_Info.ClinicID=?) -Anthony -----Original Message----- From: Glenda Wells [mailto:gwells@xxxxxxxxxxx] Sent: Monday, December 02, 2002 3:28 PM To: 'mso@xxxxxxxxxxxxx' Subject: [mso] Excel-Microsoft Query I'm very proud of myself. I wrote this in Microsoft Query which works pretty great for my purposes. I even figured out how to take the text field AvtyComment and multiply it by 1 so I could get a number value. Yea me! Actually, I probably got that from this list somewhere but I'm giving myself credit for remembering it. Anyway, I would like the date field DataStuAvty.ActivityDate to be dynamic if that's possible so we can query by date without having to edit the query each time. I tried putting the ampersand in like in Oracle but it didn't work. Any ideas welcome. /g SELECT DataStu.LastName, DataStu.FirstName, DataStu.MiddleName, DataStu.SSN, DataStuAvty.ActivityDate, DataStuAvty.Activity, DataStuAvty.AvtyComment FROM StetsonDB.dbo.DataStu DataStu, StetsonDB.dbo.DataStuAvty DataStuAvty WHERE DataStu.STUD_PKID = DataStuAvty.STUD_PKID AND ((DataStuAvty.ActivityDate={ts '2002-11-06 00:00:00'}) AND (DataStuAvty.Activity='Application fee')) ORDER BY DataStu.LastName, DataStu.FirstName, DataStu.MiddleName ************************************************************* You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or MicrosoftOffice@xxxxxxxxxxxxxxxx To send mail to the group, simply address it to mso@xxxxxxxxxxxxx To Unsubscribe from this group, send an email to mso-request@xxxxxxxxxxxxx?Subject=unsubscribe Or, visit the group's homepage and use the dropdown menu. This will also allow you to change your email settings to digest or vacation (no mail). //www.freelists.org/webpage/mso To be able to use the files section for sharing files with the group, send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with instructions. Once you are a member of the files group, you can go here to upload/download files: http://www.smartgroups.com/vault/msofiles ************************************************************* ************************************************************* You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or MicrosoftOffice@xxxxxxxxxxxxxxxx To send mail to the group, simply address it to mso@xxxxxxxxxxxxx To Unsubscribe from this group, send an email to mso-request@xxxxxxxxxxxxx?Subject=unsubscribe Or, visit the group's homepage and use the dropdown menu. This will also allow you to change your email settings to digest or vacation (no mail). //www.freelists.org/webpage/mso To be able to use the files section for sharing files with the group, send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with instructions. Once you are a member of the files group, you can go here to upload/download files: http://www.smartgroups.com/vault/msofiles ************************************************************* ************************************************************* You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or MicrosoftOffice@xxxxxxxxxxxxxxxx To send mail to the group, simply address it to mso@xxxxxxxxxxxxx To Unsubscribe from this group, send an email to mso-request@xxxxxxxxxxxxx?Subject=unsubscribe Or, visit the group's homepage and use the dropdown menu. This will also allow you to change your email settings to digest or vacation (no mail). //www.freelists.org/webpage/mso To be able to use the files section for sharing files with the group, send a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with instructions. Once you are a member of the files group, you can go here to upload/download files: http://www.smartgroups.com/vault/msofiles *************************************************************