Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query asking me twice for criteria???

Status
Not open for further replies.

ajhts

Technical User
May 1, 2001
84
US
I have a query that looks up billing by patient number. It prompts the user to enter the patient number. When they enter it, then it asks for the date. Works perfect! However, now all of a sudden after they enter the date, is starts all over again and asks for the patient number and date again. Once they enter it again, it produces the query just fine.

Why all of a sudden did this criteria change on me. I deleted my [Enter Patient Number] and [Enter Date] and reentered them in the criteria and it works for awhile, but then it goes back to asking 2 times. It gets annoying.

Thank you
AJ
 
SELECT [Patient Information].[Facility Number], [Patient Information].[Patient Number], [Patient Information].[Patient Name], [Patient Information].[Primary Diagnosis], [Patient Information].[Secondary Diagnosis], [Patient Information].[Admit Date], [Patient Information].[Onset Date], [Patient Information].[SOC Date], [Patient Information].[Payor Type]
FROM [Patient Information]
WHERE ((([Patient Information].[Facility Number])=[Enter Facility Number]));

Thanks, Doing Fine!
Hope this is what you mean by posting query. I just went to SQL view and copied and pasted it here!

AJ
 
ajhts,
Does this happen only when openning the query or when used as a report's record source? Are you being prompted for [Enter Facility Number] twice or some other prompt(s)?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Yes it happens no matter if I am directly in the query or in the report. If I delete the parameter, and add it back in and save, it will work fine for awhile, but then it goes back to asking twice. Very strange, not a huge deal for me, but very annoying for my data entry person.

Thanks
AJ
 
i'm having this problem too. i've deleted the query, compacted, then rebuilt the query and it worked fine for a day. if i copy the query and run it it asks for the criteria 3 to 5 times. i've found that if i enter data at the first prompt and not the second i get no records but if i enter data in both or just the last prompt then it works.
 
drctx,
Could you share your SQL view?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
SELECT Act.ID, Act.PartNumber, Act.JobNumber, Act.Revision, Act.LotNumber, Act.Accepted, Act.Rejected, Act.Scrapped, Act.InspDate, Act.FirstArtDate, Act.InspectorID, Act.Qty, Act.QtySampled, Act.DDR, Act.PRR, Act.InspectorName, Act.Vend
FROM Act
WHERE (((Act.PartNumber)=[Enter Part#]))
ORDER BY Act.InspDate;

i found this article on microsoft support
"Parameter Prompt Appears Twice When You Run a Query"

in the properties for the query the setting for order by is:
[Activity By Part].FirstArtDate

i deleted the order by setting and it works correctly, the orderby is causing it to prompt twice. now to find out why it keeps beeing added to the query.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top