Parameter Query

D

Denver

i have a parameter query with the following SQL
[Enter Drawing Type1] Or [Enter Drawing Type2] .......[Enter Drawing Type22].
what formula or value to enter to choose all the parameter value?is this
possible?

is there anyway i can make my SQL parameter value without doing like this
[Enter Drawing Type1] Or [Enter Drawing Type2] .......[Enter Drawing Type22]?

thanks for any help

denver
 
D

Dale Fye

This is not very clear. Why don't you describe what it is you are trying to
accomplish, and your table structure, and we can see what we can do.

Maybe even post your current SQL string, so we can analyze it.

--
HTH
Dale

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

email address is invalid
Please reply to newsgroup only.
 
D

Denver

i have my SQL here...it works will so far...but there are instances that i
want to choose all of the values, would it be possible? i try using *
asterisk but it doesnt result as i wanted. hope this is clear now, sorry if
my english is not that good.

SELECT DCN01.[Drawing Ref], DCN01.Rev, DCN01.[Physical Prog], DCN01.[Sheet
No], DCN01.Index, DCN01.Description, DCN01.Discipline, DCN01.CWP, DCN01.[Drwg
Typ], DCN01.[Drawing Title], DCN01.Location, DCN01.[Rd Line], DCN01.AsBuilt,
DCN01.SubContractor
FROM DCN01
WHERE (((DCN01.[Drwg Typ])=[Enter Drawing Type1] Or (DCN01.[Drwg
Typ])=[Enter Drawing Type2] Or (DCN01.[Drwg Typ])=[Enter Drawing Type3] Or
(DCN01.[Drwg Typ])=[Enter Drawing Type4] Or (DCN01.[Drwg Typ])=[Enter Drawing
Type5] Or ((DCN01.[Drwg Typ])=[Entr Drawing Type6] Or (DCN01.[Drwg
Typ])=[Enter Drawing Type7] Or (DCN01.[Drwg Typ])=[Enter Drawing Type8] Or
(DCN01.[Drwg Typ])=[Enter Drawing Type9] Or (DCN01.[Drwg Typ])=[Enter Drawing
Type10]) Or ((DCN01.[Drwg Typ])=[Enter Drawing Type11] Or (DCN01.[Drwg
Typ])=[Enter Drawing Type12] Or (DCN01.[Drwg Typ])=[Enter Drawing Type13] Or
(DCN01.[Drwg Typ])=[Enter Drawing Type14] Or (DCN01.[Drwg Typ])=[Enter
Drawing Type15]) Or (DCN01.[Drwg Typ])=[Enter Drawing Type16] Or
((DCN01.[Drwg Typ])=[Enter Drawing Type17] Or (DCN01.[Drwg Typ])=[Enter
Drawing Type18] Or (DCN01.[Drwg Typ])=[Enter Drawing Type19] Or (DCN01.[Drwg
Typ])=[Enter Drawing Type20] Or (DCN01.[Drwg Typ])=[Enter Drawing Type21] Or
(DCN01.[Drwg Typ])=[Enter Drawing Type22])) AND
((DCN01.SubContractor)=[SubContractor?]));


thanks anyway
Dale Fye said:
This is not very clear. Why don't you describe what it is you are trying to
accomplish, and your table structure, and we can see what we can do.

Maybe even post your current SQL string, so we can analyze it.

--
HTH
Dale

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

email address is invalid
Please reply to newsgroup only.



Denver said:
i have a parameter query with the following SQL
[Enter Drawing Type1] Or [Enter Drawing Type2] .......[Enter Drawing Type22].
what formula or value to enter to choose all the parameter value?is this
possible?

is there anyway i can make my SQL parameter value without doing like this
[Enter Drawing Type1] Or [Enter Drawing Type2] .......[Enter Drawing Type22]?

thanks for any help

denver
 
D

Dale Fye

How many different drawing types do you have?

So, when you run this query, you are getting prompted for 22 different
drawing types, and you are either typing in values, or hitting enter for each
of these, right?

Why don't you create a table of drawing types (I would guess you probably
already have one) with an added field for IncludeThis (Yes/No). Then create
a continuous form that is based on that table. Put a Query button in the
forms footer, that when clicked will open your query for you. When you open
this form, set the IncludeThis field to false for all the records. Then
click in the checkbox for each of the drawing types you want to include.

Now, create your query that looks like:

SELECT DCN01.[Drawing Ref], DCN01.Rev, DCN01.[Physical Prog],
DCN01.[Sheet No], DCN01.Index, DCN01.Description,
DCN01.Discipline, DCN01.CWP, DCN01.[Drwg Typ],
DCN01.[Drawing Title], DCN01.Location, DCN01.[Rd Line],
DCN01.AsBuilt, DCN01.SubContractor
FROM DCN01
INNER JOIN tblDrawingTypes
ON DCN01.[Drwg Typ] = tblDrawingTypes.[Drwg Type]
WHERE tblDrawingTypes.[IncludeThis] = True

Then, to get all of the values you just check all of the IncludeThis boxes,
or, as I would do it, you add a "Select All" button that sets the IncludeThis
field to True for all values.

--
HTH
Dale

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

email address is invalid
Please reply to newsgroup only.



Denver said:
i have my SQL here...it works will so far...but there are instances that i
want to choose all of the values, would it be possible? i try using *
asterisk but it doesnt result as i wanted. hope this is clear now, sorry if
my english is not that good.

SELECT DCN01.[Drawing Ref], DCN01.Rev, DCN01.[Physical Prog], DCN01.[Sheet
No], DCN01.Index, DCN01.Description, DCN01.Discipline, DCN01.CWP, DCN01.[Drwg
Typ], DCN01.[Drawing Title], DCN01.Location, DCN01.[Rd Line], DCN01.AsBuilt,
DCN01.SubContractor
FROM DCN01
WHERE (((DCN01.[Drwg Typ])=[Enter Drawing Type1] Or (DCN01.[Drwg
Typ])=[Enter Drawing Type2] Or (DCN01.[Drwg Typ])=[Enter Drawing Type3] Or
(DCN01.[Drwg Typ])=[Enter Drawing Type4] Or (DCN01.[Drwg Typ])=[Enter Drawing
Type5] Or ((DCN01.[Drwg Typ])=[Entr Drawing Type6] Or (DCN01.[Drwg
Typ])=[Enter Drawing Type7] Or (DCN01.[Drwg Typ])=[Enter Drawing Type8] Or
(DCN01.[Drwg Typ])=[Enter Drawing Type9] Or (DCN01.[Drwg Typ])=[Enter Drawing
Type10]) Or ((DCN01.[Drwg Typ])=[Enter Drawing Type11] Or (DCN01.[Drwg
Typ])=[Enter Drawing Type12] Or (DCN01.[Drwg Typ])=[Enter Drawing Type13] Or
(DCN01.[Drwg Typ])=[Enter Drawing Type14] Or (DCN01.[Drwg Typ])=[Enter
Drawing Type15]) Or (DCN01.[Drwg Typ])=[Enter Drawing Type16] Or
((DCN01.[Drwg Typ])=[Enter Drawing Type17] Or (DCN01.[Drwg Typ])=[Enter
Drawing Type18] Or (DCN01.[Drwg Typ])=[Enter Drawing Type19] Or (DCN01.[Drwg
Typ])=[Enter Drawing Type20] Or (DCN01.[Drwg Typ])=[Enter Drawing Type21] Or
(DCN01.[Drwg Typ])=[Enter Drawing Type22])) AND
((DCN01.SubContractor)=[SubContractor?]));


thanks anyway
Dale Fye said:
This is not very clear. Why don't you describe what it is you are trying to
accomplish, and your table structure, and we can see what we can do.

Maybe even post your current SQL string, so we can analyze it.

--
HTH
Dale

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

email address is invalid
Please reply to newsgroup only.



Denver said:
i have a parameter query with the following SQL
[Enter Drawing Type1] Or [Enter Drawing Type2] .......[Enter Drawing Type22].
what formula or value to enter to choose all the parameter value?is this
possible?

is there anyway i can make my SQL parameter value without doing like this
[Enter Drawing Type1] Or [Enter Drawing Type2] .......[Enter Drawing Type22]?

thanks for any help

denver
 

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