09-09-03, 18:28 #1Registered User
- Join Date
- Jan 2003
I have a database with several different entries in one field. I want the query to select 3 of the entries instead of just one.
Example: if in one field I have potatoes, oranges, squash, peanuts, apples, grapes, carrots and lettuce.
I want the database to pick all oranges, apples and grapes from that field.
I could add another field with veg or fruit as the entry and select based on that field, but I don't want to create another field. The problem is another person doing the entry and me trying to database it. The other person will raise a big stink if she has to type more info. Not to mention she doesn't have a clue what she is entering other than just a word.
09-10-03, 10:19 #2Registered User
- Join Date
- Sep 2003
It looks as though you're going to need either a complicated InStr function with Mids or, (better, IMHO), have a form for the entry, keep the one field, and parse the entry into a child table from the main.
I understand your anticipated frustration, but it's probably not good design to have a comma delimited field of values, when you are interested in just a couple of entries from that field.
With the form method, you can achieve both goals.
MikeAll code ADO/ADOX unless otherwise specified.