Parameter Prompt with Multiple Entries (1 Viewer)

ekje

Registered User.
Local time
Yesterday, 16:08
Joined
Jan 8, 2014
Messages
34
Hi,

My question is about how to create a parameter prompt that accepts multiple
entries. The table contains data of several projects (project numbers 1,2,3,4 and 5) If the user wants to search data from the project numbers 1 and 2 he/she
should enter the project numbers 1 and 2.
If I create a parameter query in the ProjectNumber field like
this: [Enter Project Number:] AND [Enter Project Number] this query
asks only the first [Enter Project Number.
How could I create a parameter query that asks two times [Enter Project Number:]?
I wish I'll get the reply very soon:)
Thank you.
 

plog

Banishment Pending
Local time
Yesterday, 18:08
Joined
May 11, 2011
Messages
11,638
If I create a parameter query in the ProjectNumber field like
this: [Enter Project Number:] AND [Enter Project Number] this query
asks only the first [Enter Project Number.

1. That's not my experience. When I used that criteria string it worked...

2. ...And by 'worked' I mean it executed the query but returned no results. That's because you used AND. There is no way a project number can equal 1 and 2 at the same time. A project number could equal 1 OR 2, but that AND makes it logically impossible to return a result.

My advice is to replace your criteria with this:

[Enter First Project] OR [Enter Second Project]

Give that exact line above a shot.
 

ekje

Registered User.
Local time
Yesterday, 16:08
Joined
Jan 8, 2014
Messages
34
Hi,

I mean the situation what the attachment file contains.
The attached file contains an example from the book "Access 2013 Bible" pages 396-397.
I tried the type the text "InStr ([Enter Periods separated by commas], [Period])", (page 397) but this query did not work.
It there some type error in the book example?
Thank you for the reply!


1. That's not my experience. When I used that criteria string it worked...

2. ...And by 'worked' I mean it executed the query but returned no results. That's because you used AND. There is no way a project number can equal 1 and 2 at the same time. A project number could equal 1 OR 2, but that AND makes it logically impossible to return a result.

My advice is to replace your criteria with this:

[Enter First Project] OR [Enter Second Project]

Give that exact line above a shot.
 

Attachments

  • Parameter_Prompt_Multiple_Entries_Access_2013_Bible.jpg
    Parameter_Prompt_Multiple_Entries_Access_2013_Bible.jpg
    60.9 KB · Views: 84

plog

Banishment Pending
Local time
Yesterday, 18:08
Joined
May 11, 2011
Messages
11,638
Contact the editors for errors in the book.

Why are you using 2 parameter inputs? That example says only 1 is necessary for checking a whole bunch of number.

Can you post your full SQL for that query?
 

ekje

Registered User.
Local time
Yesterday, 16:08
Joined
Jan 8, 2014
Messages
34
Hi
Thank you for the quick reply.
I should use (for example) parameters with two entries/inputs because I need to get data from two projects from the database.

So how is it possible to create a parameter prompt that accepts multiple
entries (here: 2 entries)?

Thank you for your reply:)
-----------------------------------------------------------

Contact the editors for errors in the book.

Why are you using 2 parameter inputs? That example says only 1 is necessary for checking a whole bunch of number.

Can you post your full SQL for that query?
 

plog

Banishment Pending
Local time
Yesterday, 18:08
Joined
May 11, 2011
Messages
11,638
If you read the page you stole your code from you will see it allows for multiple input numbers.

If you post your full SQL I can help more specfically.
 

Users who are viewing this thread

Top Bottom