Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
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
 
Old October 21st, 2003, 05:47 PM
Authorized User
 
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old October 21st, 2003, 06:11 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old October 21st, 2003, 07:44 PM
Authorized User
 
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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..
 
Old October 21st, 2003, 09:52 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you trying to select one of three islands?

Sal
 
Old October 21st, 2003, 09:59 PM
Authorized User
 
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

there are six islands total and you can select one, two three or you can select all six..
 
Old October 21st, 2003, 10:11 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old October 21st, 2003, 10:15 PM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old October 21st, 2003, 11:20 PM
Authorized User
 
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old October 21st, 2003, 11:23 PM
Authorized User
 
Join Date: Jun 2003
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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..
 
Old October 22nd, 2003, 09:11 AM
sal sal is offline
Friend of Wrox
 
Join Date: Oct 2003
Posts: 702
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Values In One Field lefty4080 Access 1 December 12th, 2007 08:59 AM
find multiple values from a table field raaj Beginning PHP 0 September 17th, 2007 03:51 AM
multiple values insert into one field mateenmohd Classic ASP Basics 0 May 29th, 2007 02:11 AM
get the values of form field values crmpicco Perl 2 March 16th, 2007 10:57 AM
Adding multiple form field values to database cdenequolo Classic ASP Basics 1 August 17th, 2004 05:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.