Ceating reports from query from a table with multiple choices

M

Max

Hello,

I am having trouble creating a report from a query. I
hope this isn't too confusing with my laymans
explanations, but here I go. I have two tables relating
to "Bid Packages" One table allows bid packages to be
entered with multiple choices (008/009/012) as well as
single entry (008). Another table has a description of
each package 008 = (Plumbing).

I want to create a report that queries out all items that
includes the package (created a query with criteria =
like"*008*") I wanted to have a header that would pull
the description of the table for each queried package.
Problem is that the query returns the first record with
the package but does not include the unique package
description. I also experimented with Using [Enter Bid
Package No] in the criteria. This allows me to enter in
the Package number I want a report on. Problem is that I
am having trouble using wildercards (*008*.

Whew...Any ideas.
 
M

Michel Walsh

Hi,


You table does not respect the normalization rules (what is expected to
be): a single value should be stored in each column. The following may work,
but can be very slow:


SELECT a.*, b.*
FROM BidPackages As a INNER JOIN PackagesDescription As b
ON a.packages LIKE "*" & b.package & "*"
WHERE a.packages LIKE "*" & parameter & "*"


or

SELECT a.*, b.*
FROM BidPackages As a, PackagesDescription As b
WHERE b.packages LIKE "*" & parameter & "*"
AND a.packages LIKE "*" & parameter & "*"

assuming that the parameter is about just one choice.



Hoping it may help,
Vanderghast, Access MVP
 

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