 |
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

October 21st, 2003, 05:47 PM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
multiple values in an access field
I have a form with checkboxes, I would like to put multiple "values"
from those checkboxes in one database field,
ex: if i have a database field "island"
and i have a form with 5 checkboxes, each check box represents a different island:
oahu
maui
kauai
In my asp page I check those checkboxes to see if they have been selected, and if they have, then i put them in the one field in my access database "island"
however i get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Duplicate output destination 'type'.
Is there a way to get around this?
thanks
|

October 21st, 2003, 06:11 PM
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
A checkbox is a True or False value (one checkbos, two total values), however, your islands are oahu, maui, kauai, (3 checkboxes, six total values).
Tree islands, tree True/false fields.
Something does not make sense. Are you trying to put too many values into one field?
Sal
|

October 21st, 2003, 07:44 PM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanks for the reply..
i'm wondering if I can put more then one value in an access "field" .
In access I would like to have a field called "islands" and then have values, such as, oahu, kauai..etc... on another row in the field "islands" I may have .. maui, lanai..
so i have a form, that has check boxes like the ones below...
<input type="checkbox" name="locationOahu" value="oahu">
<input type="checkbox" name="locationKaui" value="kauai">
when i submit this form, i check to see if "locationOahu <> 0 " then add the "value" to the field "island" in my database..
do you know if it is possible to have multiple values in one field? do i need to submit them seperatly?
thanks... i hope that is clearer..
|

October 21st, 2003, 09:52 PM
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Are you trying to select one of three islands?
Sal
|

October 21st, 2003, 09:59 PM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
there are six islands total and you can select one, two three or you can select all six..
|

October 21st, 2003, 10:11 PM
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
You need to change your table structure.
Please provide me your current table structure,Table name and field names. I will show you how to change them, not that difficult.
Sal
|

October 21st, 2003, 10:15 PM
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Will the number of islands ever change? What else do you do with the information you gather from this islands. I am thinking, maybe you need another table to keep your available islands, allowing for additional islands in the future.
Sal
|

October 21st, 2003, 11:20 PM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
sal,
i thinkyou are right about the table structure,,, i am just going to give the islands their own field and the value "yes, or no" like you mentioned earlier.. i will then just change my search to look for those values..
if you have another idea about changing the table structure.. let me know
thanks again..:)
kathleen
|

October 21st, 2003, 11:23 PM
|
Authorized User
|
|
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
oh one thing..
i have another part of my form that has 40 checkboxes.. i know will make seperate columns for each value in my database.. is that going to slow down my database a lot whne i do a query? or is it not significant..
|

October 22nd, 2003, 09:11 AM
|
Friend of Wrox
|
|
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
That is a lot of check boxes. What exactly are you trying to accomplish with this? what is the business need for it? There may be a better way. I personally do not like tables designed with too many check boxes.
Sal
|
|
 |