can you put multiple data items in a field and be able to query t

G

Guest

In Access 2003, can you put multiple data items in a field and be able to
query a specifc item in the field. Example if I name a field "Musical
Instruments", can I put in the field "Guitar, piano, violin, etc and then
query all records for violin and be able to find a record that has more than
violin in it.??
Thanks for any help.
 
R

Rick B

You can, but you should not.

That is called a one-to-many relationship. You would have one record for
the "person" and one record in a separate table for each instrument they
play. Or similar scheme.

A field in Access should contain exactly one piece of data.
 
T

Tom Ellison

Dear Chevy:

The way you have constructed this is not really very database-like. But
we'll give it a shot.

Now, "a record that has more than "violin" in it could be defined as any
record where this column is not empty, and does not say "violin". If it
says "Tuba, Trombone" (that is, it doesn't say violin at all) this would
meet the definition.

My guess is you want it to say "violin" but not JUST "violin". So then we
need two criteria.

<> "Violin"
AND
LIKE "*Violin*"

That would make it work according to what I'm guessing you meant.

Tom Ellison
 
G

Guest

Tom Ellison said:
Dear Chevy:

The way you have constructed this is not really very database-like. But
we'll give it a shot.

Now, "a record that has more than "violin" in it could be defined as any
record where this column is not empty, and does not say "violin". If it
says "Tuba, Trombone" (that is, it doesn't say violin at all) this would
meet the definition.

My guess is you want it to say "violin" but not JUST "violin". So then we
need two criteria.

<> "Violin"
AND
LIKE "*Violin*"

That would make it work according to what I'm guessing you meant.

Tom Ellison





Thanks for your help...
 

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