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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting "enter parameter value" popup box...and i dont want it!!!

Status
Not open for further replies.

allcarfan

Programmer
Jan 29, 2003
33
0
0
US
Here are 4 expressions that are in two different queries. One query works perfectly. When the other query is run a popup box displays saying Category I - enter parameter value. I cant seem to figure out why. I took the database that was working perfectly, copied and pasted it and gave the query a new name. I created a button so it would perform the exact same scenarios of the other query. For some reason I STILL got the enter parameter value. Why on earth with a duplicate query with a different name display that when the other one works perfectly (the changing of the query name should have nothing to do with it because i changed the name of the query to run on the button i created. Here are the 4 expressions that are in question. The first two are from the query that works properly.

Due Date: (IIf([Category I]=True,[Sent to Field]+20,[Sent to Field]+30))

Expr1: IIf([Category I]=True,[Sent to Field]+20,[Sent to Field]+30)

The two above expressions are in two different fields within the query. Now for the two pieces of code from the other query that are in question and make the 'enter parameter value' box display. Yes, I know that 'sent to field' is changed to 'Date of Action'.

Due Date: (IIf([Category I]=True,[Date of Action]+20,[Date of Action]+30))

Expr1: IIf([Category I]=True,[Date of Action]+20,[Date of Action]+30)

What in the heck is the difference in these pieces of code???!!!!

 
Did you take a look at the SQL view yet? If you'd like to post it here you can have more eyes helping. Ann
 
SELECT [Main Tracking Table].[Report Number], [Main Tracking Table].CAGE, [Main Tracking Table].Team, [Main Tracking Table].[Date of Action], [Main Tracking Table].[PQDR Number], (IIf([Category I]=True,[Date of Action]+30,[Date of Action]+60)) AS [Due Date], IIf([Category I]=True,[Date of Action]+30,[Date of Action]+60) AS Expr1
FROM [Main Tracking Table]
WHERE ((([Main Tracking Table].CAGE)=[Forms]![PQDRs Coming Due]![Cage1]) AND (([Main Tracking Table].Team)=[Forms]![PQDRs coming Due]![Team]) AND (([Main Tracking Table].[Date of Action]) Is Not Null) AND ((IIf([Category I]=True,[Date of Action]+30,[Date of Action]+60)) Between Date() And Date()+[Forms]![PQDRs Coming Due]![Days])) OR ((([Main Tracking Table].Team)=[Forms]![PQDRs coming Due]![Team]) AND (([Main Tracking Table].[Date of Action]) Is Not Null) AND ((IIf([Category I]=True,[Date of Action]+30,[Date of Action]+60)) Between Date() And Date()+[Forms]![PQDRs Coming Due]![Days]) AND (([Forms]![PQDRs Coming due]![Cage1]) Is Null)) OR ((([Main Tracking Table].CAGE)=[Forms]![PQDRs Coming Due]![Cage1]) AND (([Main Tracking Table].[Date of Action]) Is Not Null) AND ((IIf([Category I]=True,[Date of Action]+30,[Date of Action]+60)) Between Date() And Date()+[Forms]![PQDRs Coming Due]![Days]) AND (([Forms]![PQDRs Coming Due]![Team]) Is Null)) OR ((([Main Tracking Table].[Date of Action]) Is Not Null) AND ((IIf([Category I]=True,[Date of Action]+30,[Date of Action]+60)) Between Date() And Date()+[Forms]![PQDRs Coming Due]![Days]) AND (([Forms]![PQDRs Coming due]![Cage1]) Is Null) AND (([Forms]![PQDRs Coming Due]![Team]) Is Null));


Thats the one that doesnt work

This one does...
SELECT [Main Tracking Table].[Report Number], [Main Tracking Table].CAGE, [Main Tracking Table].Team, [Main Tracking Table].[Date of Action], [Main Tracking Table].[PQDR Number], (IIf([Category I]=True,[Sent to Field]+20,[Sent to Field]+30)) AS [Due Date], IIf([Category I]=True,[Sent to Field]+20,[Sent to Field]+30) AS Expr1
FROM [Main Tracking Table]
WHERE ((([Main Tracking Table].CAGE)=[Forms]![PQDRs Coming Due]![CAGE1]) AND (([Main Tracking Table].Team)=[Forms]![PQDRs Coming Due]![Team]) AND (([Main Tracking Table].[Date of Action]) Is Null) AND ((IIf([Category I]=True,[Sent to Field]+20,[Sent to Field]+30)) Between Date() And Date()+[Forms]![PQDRs Coming Due]![Days])) OR ((([Main Tracking Table].Team)=[Forms]![PQDRs Coming Due]![Team]) AND (([Main Tracking Table].[Date of Action]) Is Null) AND ((IIf([Category I]=True,[Sent to Field]+20,[Sent to Field]+30)) Between Date() And Date()+[Forms]![PQDRs Coming Due]![Days]) AND (([Forms]![PQDRs Coming Due]![CAGE1]) Is Null)) OR ((([Main Tracking Table].CAGE)=[Forms]![PQDRs Coming Due]![CAGE1]) AND (([Main Tracking Table].[Date of Action]) Is Null) AND ((IIf([Category I]=True,[Sent to Field]+20,[Sent to Field]+30)) Between Date() And Date()+[Forms]![PQDRs Coming Due]![Days]) AND (([Forms]![PQDRs COming Due]![Team]) Is Null)) OR ((([Main Tracking Table].[Date of Action]) Is Null) AND ((IIf([Category I]=True,[Sent to Field]+20,[Sent to Field]+30)) Between Date() And Date()+[Forms]![PQDRs Coming Due]![Days]) AND (([Forms]![PQDRs Coming Due]![CAGE1]) Is Null) AND (([Forms]![PQDRs COming Due]![Team]) Is Null));
 
Well, come to find out, it wasnt my code. It was a filter that I had accidentally specified in one of my macros that opened a report that was based on said Query. I took out the filter...and...viola!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top