473,396 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Enter Parameter Value

Hi,

I have a query to check for condition. but when i execute, a message box apprear. "Enter Parameter Value"

below is my code.
Expand|Select|Wrap|Line Numbers
  1. Stat: IIf([AvgOfTL PO and Inv]<7,[StatA],IIf([AvgOfTL PO and Inv]<10,[StatB]))
Jul 2 '07 #1
23 2206
puppydogbuddy
1,923 Expert 1GB
Hi,

I have a query to check for condition. but when i execute, a message box apprear. "Enter Parameter Value"

below is my code.
Expand|Select|Wrap|Line Numbers
  1. Stat: IIf([AvgOfTL PO and Inv]<7,[StatA],IIf([AvgOfTL PO and Inv]<10,[StatB]))
If [StatA] and [StatB] are textboxes on your form, you need to provide a full reference as shown. Replace yourForm with the actual name of your form.

Expand|Select|Wrap|Line Numbers
  1. Stat: IIf([AvgOfTL PO and Inv]<7,Forms!YourForm![StatA],IIf([AvgOfTL PO and Inv]<10,Forms!YourForm![StatB]))
Jul 2 '07 #2
NeoPa
32,556 Expert Mod 16PB
What's the prompt in the Message Box?
Jul 2 '07 #3
If [StatA] and [StatB] are textboxes on your form, you need to provide a full reference as shown. Replace yourForm with the actual name of your form.

Expand|Select|Wrap|Line Numbers
  1. Stat: IIf([AvgOfTL PO and Inv]<7,Forms!YourForm![StatA],IIf([AvgOfTL PO and Inv]<10,Forms!YourForm![StatB]))

Hi,

I don't have any form in my Ms Access.

All i have is tables and query.
Jul 3 '07 #4
What's the prompt in the Message Box?

Hi,

the prompt is " Enter Parameter Value"
Jul 3 '07 #5
NeoPa
32,556 Expert Mod 16PB
You should have a Title (Enter Parameter Value), then a Prompt (?), then a box to enter your value in.
What is the Prompt?
Jul 3 '07 #6
You should have a Title (Enter Parameter Value), then a Prompt (?), then a box to enter your value in.
What is the Prompt?


Hi,

the prompt is Stat A and Stat B
Jul 4 '07 #7
Hi,

the prompt is Stat A and Stat B

SOrry,

what i mean is, firstly the prompt is Stat A, then after pressing enter,
it come out another prompt which is Stat B.

hope it will be clearer.
Jul 4 '07 #8
NeoPa
32,556 Expert Mod 16PB
Right, in that case you are missing both of those fields from your query input.
As you have spelled them differently even here between two of your own posts, I think it very likely that you have done the same in your query. Check the spellings. Are they [StatA] or are they [Stat A]?
Do the same for [StatB] of course.
Jul 4 '07 #9
Right, in that case you are missing both of those fields from your query input.
As you have spelled them differently even here between two of your own posts, I think it very likely that you have done the same in your query. Check the spellings. Are they [StatA] or are they [Stat A]?
Do the same for [StatB] of course.

Hi,

WHat do you mean by...
"missing both of those fields from your query input"

Please help..
Jul 5 '07 #10
NeoPa
32,556 Expert Mod 16PB
I do TRY to help ;)
Your query must be taking its data from somewhere. This can be a single or multiple data sources. In the SQL view of your query you will see this (these) defined in the FROM clause. In the design view you will see it in the Tables area (above the definition of the fields you want the query to return).

It may be easier to help you if you posted the SQL string of the query that you are working on. That way we can help you more easily.
Jul 5 '07 #11
I do TRY to help ;)
Your query must be taking its data from somewhere. This can be a single or multiple data sources. In the SQL view of your query you will see this (these) defined in the FROM clause. In the design view you will see it in the Tables area (above the definition of the fields you want the query to return).

It may be easier to help you if you posted the SQL string of the query that you are working on. That way we can help you more easily.

Hi,

below is my query codes:

Expand|Select|Wrap|Line Numbers
  1. SELECT [Average time lead between PO date and Inv Date].[AvgOfTL PO and Inv], IIf([AvgOfTL PO and Inv]<7,[StatA],IIf([AvgOfTL PO and Inv]<10,[StatB])) AS Stat
  2. FROM [Average time lead between PO date and Inv Date];
  3.  
Thanks alot
Jul 10 '07 #12
NeoPa
32,556 Expert Mod 16PB
I'll have to look at this when I return on Thursday.
Please bump the thread if I skip it.
Jul 10 '07 #13
I'll have to look at this when I return on Thursday.
Please bump the thread if I skip it.
*knock knock*

=)

kiNdly please help..
Jul 16 '07 #14
NeoPa
32,556 Expert Mod 16PB
"Bump" received and understood. I'll do what I can when I can :)
Jul 16 '07 #15
NeoPa
32,556 Expert Mod 16PB
Hi,

below is my query codes:

Expand|Select|Wrap|Line Numbers
  1. SELECT [Average time lead between PO date and Inv Date].[AvgOfTL PO and Inv], IIf([AvgOfTL PO and Inv]<7,[StatA],IIf([AvgOfTL PO and Inv]<10,[StatB])) AS Stat
  2. FROM [Average time lead between PO date and Inv Date];
  3.  
Thanks alot
In post #7 you say :
Hi,

the prompt is Stat A and Stat B
Looking at your SQL that cannot be true. Did you mean StatA & StatB instead?
Where do you expect the query to get StatA & StatB from?
Please answer both questions accurately and clearly.
Jul 16 '07 #16
NeoPa
32,556 Expert Mod 16PB
In the mean time, I just want to redo your SQL in a form which is clearer to read and understand. It will be essentially the same as your version and is only done so that we can work with it more easily.
Expand|Select|Wrap|Line Numbers
  1. SELECT [AvgOfTL PO and Inv],
  2.        IIf([AvgOfTL PO and Inv]<7,
  3.            [StatA],
  4.            IIf([AvgOfTL PO and Inv]<10,
  5.                [StatB])) AS Stat
  6. FROM [Average time lead between PO date and Inv Date];
Now, do you want to return the strings 'StatA' & 'StatB' instead of some strange undefined variables ([StatA] & [StatB])?

NB. You haven't provided a value for Stat in the case where [AvgOfTL PO and Inv]>=10. Perhaps you want the value "StatC"?

Don't forget to answer the questions in post #16 first.
Jul 16 '07 #17
In post #7 you say :

Looking at your SQL that cannot be true. Did you mean StatA & StatB instead?
Where do you expect the query to get StatA & StatB from?
Please answer both questions accurately and clearly.
yeap. What i want is StatA and StatB.

eh? i though i could juz assign a "StatA" for the query.

THis is because, What i have is a condition query. iF tat query is less than 7, it will assign StatA.
Jul 17 '07 #18
In the mean time, I just want to redo your SQL in a form which is clearer to read and understand. It will be essentially the same as your version and is only done so that we can work with it more easily.
Expand|Select|Wrap|Line Numbers
  1. SELECT [AvgOfTL PO and Inv],
  2.        IIf([AvgOfTL PO and Inv]<7,
  3.            [StatA],
  4.            IIf([AvgOfTL PO and Inv]<10,
  5.                [StatB])) AS Stat
  6. FROM [Average time lead between PO date and Inv Date];
Now, do you want to return the strings 'StatA' & 'StatB' instead of some strange undefined variables ([StatA] & [StatB])?

NB. You haven't provided a value for Stat in the case where [AvgOfTL PO and Inv]>=10. Perhaps you want the value "StatC"?

Don't forget to answer the questions in post #16 first.
hmmm... for [AvgOfTL PO and Inv]>=10 i already define it as StatB.
i'm confused now..
Jul 17 '07 #19
NeoPa
32,556 Expert Mod 16PB
hmmm... for [AvgOfTL PO and Inv]>=10 i already define it as StatB.
i'm confused now..
Your code assigns [StatB] (still unclear whether this should be a string 'StatB', or a field [StatB]) when [AvgOfTL PO and Inv] is >= 7 and < 10. A value of 10 or greater is unspecified.
Jul 17 '07 #20
NeoPa
32,556 Expert Mod 16PB
yeap. What i want is StatA and StatB.

eh? i though i could juz assign a "StatA" for the query.

THis is because, What i have is a condition query. iF tat query is less than 7, it will assign StatA.
"StatA" you CAN assign. [StatA] you can NOT. At least not without specifying where it should come from.
"StatA" = 'StatA' but within SQL 'StatA' is the more correct version.
Jul 17 '07 #21
"StatA" you CAN assign. [StatA] you can NOT. At least not without specifying where it should come from.
"StatA" = 'StatA' but within SQL 'StatA' is the more correct version.
YEA!!

so [StatA] = field
while
'StatA' = Variable (can be assign)

now, it solve my problem.

thanks alot!!

=)
Jul 18 '07 #22
NeoPa
32,556 Expert Mod 16PB
Nearly.
[StatA] is a field (correct), and will show the CONTENTS of [StatA] - whatever they are.
'StatA', like 'Hello World', is a literal string and will always come out as :
Expand|Select|Wrap|Line Numbers
  1. StatA
I'm very pleased you've solved your problem anyway.
Jul 18 '07 #23
Nearly.
[StatA] is a field (correct), and will show the CONTENTS of [StatA] - whatever they are.
'StatA', like 'Hello World', is a literal string and will always come out as :
Expand|Select|Wrap|Line Numbers
  1. StatA
I'm very pleased you've solved your problem anyway.

i see i see..

lesson learnt!

=)
Jul 19 '07 #24

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stuart E. Wugalter | last post by:
Hello. No one in the queries newgroup answered this question. I hope someone here can. Thank you. Stuart The following Update Query allows my users to substitute a numerical value for the...
1
by: Chuck | last post by:
I have a query that uses the query with the critera set to . We I run the query the msgbox pops up asking for the name information to be entered, but on the top (blue background) of the message box...
9
by: Megan | last post by:
Hi- I'm creating a database of music bands with their cds and songs. I'm trying to program an SQL statement so that I can enter a string of text in a textbox, press the 'Enter' key, and have...
8
by: Dan Holmes | last post by:
I am receiving data from the stream of a socket. I am trying to determine if the user pressed the Enter key. The buffer has 2 non-zero bytes when the user presses enter: 13 and 10. If i...
3
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent...
2
by: billtubbs | last post by:
Hi I am getting the common problem of the "Enter Parameter Value" dialog box, which pops up every time I execute a query. I built the query using the Expression Builder in Access. If any of my...
1
by: waltnixon | last post by:
I've got an MS Access query which runs fine when double clicked and returns all of the rows in a test database I'm building. I've set up a multi group report based on the query. I immediately...
1
by: janekelly111 | last post by:
I have a main form with one subform linked by a one-to-many relationship on one field only. The main form;s recordsource is a query determined and assigned from a command button on a "Find" form...
2
by: Sep410 | last post by:
Hi all, I am using vb.net and Sql2005 and crystal report viewer in my application. the peroblem is when I run a report and I set the value for parameter a Enter Parameter value pops up.I shoudl...
9
by: junaidfaiz | last post by:
How can i get rid of "Enter Parameter Value" check boxes? as when i open my bill section there I have called multiple queries, forms and tables. It works perfectly fine. No error in calculation or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.