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

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
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
 
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...
 
Back
Top