Query Prompting for Info that it shouldn't be

S

ShannaD

I have a query that is prompting for entry of a parameter (maybe not a
parameter but it is prompting for information) that it shouldn't be. The
data that it is prompting for is DayDate:

DayDate: DatePart("d",[POST_DATE])

Then this data is used in:

IDDate: Trim([LABORER]) & Trim([DayDate])

There is nothing in the criteria line and both DayDate and IDDate calculate
properly even if you just hit enter when it prompts. I would like to
eliminate the useless prompt though.

Any ideas? Thanks for any help!
Shanna
 
D

Dale Fye

Shanna,

Where is the declaration of [DayDate] in the overall SQL for this query,
does it come before (to the left) of IDDate? If not, put it in front of
IDDate and see if that makes a difference. You might also want to try adding
the tablename in front of [Post_Date] in the computed value.

DayDate: DatePart("d", [yourTableName].[Post_Date])

Since you computed value for [DayDate] is so small, it might just be easier
to do:

IDDate: Trim([Laborer]) & TRIM(DatePart("d", [Post_Date]))

HTH
Dale
 
D

Dennis

I've just done a test similar to yours and mine does not prompt. But, if I
sort on the IDDate column then it prompts. If I click OK and don't enter
anything at the prompt, my IDDate column is not correct.
 
S

ShannaD

Dale,

Thank you - I didn't even think about removing DayDate but it worked! As
for the order, it was in front so I am still baffled by that. But it doesn't
matter because now it works.

Thanks again!
Shanna

Dale Fye said:
Shanna,

Where is the declaration of [DayDate] in the overall SQL for this query,
does it come before (to the left) of IDDate? If not, put it in front of
IDDate and see if that makes a difference. You might also want to try adding
the tablename in front of [Post_Date] in the computed value.

DayDate: DatePart("d", [yourTableName].[Post_Date])

Since you computed value for [DayDate] is so small, it might just be easier
to do:

IDDate: Trim([Laborer]) & TRIM(DatePart("d", [Post_Date]))

HTH
Dale
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



ShannaD said:
I have a query that is prompting for entry of a parameter (maybe not a
parameter but it is prompting for information) that it shouldn't be. The
data that it is prompting for is DayDate:

DayDate: DatePart("d",[POST_DATE])

Then this data is used in:

IDDate: Trim([LABORER]) & Trim([DayDate])

There is nothing in the criteria line and both DayDate and IDDate calculate
properly even if you just hit enter when it prompts. I would like to
eliminate the useless prompt though.

Any ideas? Thanks for any help!
Shanna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top