Forums
This topic is locked
multi-selection list menu help
Posted 17 Jun 2004 22:37:37
1
has voted
17 Jun 2004 22:37:37 Kim Wilson posted:
<font face='Comic Sans MS'></font id='Comic Sans MS'>Hello,
I was wondering if there was a way to store data into an MS Acess database, using a single field, from using a multi-selection list menu in dmx 2004? Any help would be appreciated.
Replies
Replied 18 Jun 2004 14:49:28
18 Jun 2004 14:49:28 Simon Martin replied:
Do you want to concatenate the selections and store them in a single field - that would seem rather bad from a db design point of view.
Or do you want to insert them individually but linked to a master record - so each of the selected values would be joined using the PK of the main record? George Petrov's extension InsertWithIdent would be a good place to start for that method
Or do you want to insert them individually but linked to a master record - so each of the selected values would be joined using the PK of the main record? George Petrov's extension InsertWithIdent would be a good place to start for that method
Replied 21 Jun 2004 23:55:13
21 Jun 2004 23:55:13 Kim Wilson replied:
In this situation I really do need all of the information to go to a single field. So your option one is exactly what I'm looking for, unfortunately.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Do you want to concatenate the selections and store them in a single field - that would seem rather bad from a db design point of view.
Or do you want to insert them individually but linked to a master record - so each of the selected values would be joined using the PK of the main record? George Petrov's extension InsertWithIdent would be a good place to start for that method
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Do you want to concatenate the selections and store them in a single field - that would seem rather bad from a db design point of view.
Or do you want to insert them individually but linked to a master record - so each of the selected values would be joined using the PK of the main record? George Petrov's extension InsertWithIdent would be a good place to start for that method
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 22 Jun 2004 16:04:29
22 Jun 2004 16:04:29 Simon Martin replied:
If you are using a list box with multiple selections allowed then, when that form is submitted, all values are sent as part of an array.
Have you tried simply doing an INSERT, or picking up the values submitted above your insert code and concatenating them into 1 variable there?
HTH
Simon
Have you tried simply doing an INSERT, or picking up the values submitted above your insert code and concatenating them into 1 variable there?
HTH
Simon
Replied 22 Jun 2004 19:19:21
22 Jun 2004 19:19:21 Kim Wilson replied:
I have tried to submit the form using muliple values, but when I submit the form I don't receive an error, but the insert statement that I have does not add the record to my database. So, at this point I'm just stuck b/c I don't know what to do from here.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
If you are using a list box with multiple selections allowed then, when that form is submitted, all values are sent as part of an array.
Have you tried simply doing an INSERT, or picking up the values submitted above your insert code and concatenating them into 1 variable there?
HTH
Simon
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
If you are using a list box with multiple selections allowed then, when that form is submitted, all values are sent as part of an array.
Have you tried simply doing an INSERT, or picking up the values submitted above your insert code and concatenating them into 1 variable there?
HTH
Simon
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Replied 23 Jun 2004 12:09:51
23 Jun 2004 12:09:51 Simon Martin replied:
Can you explain what you are trying to do / why you need to do it this way.
Could you post the form, without doing the insert, to a page that just shows what values you are getting from the form elements - just to see what you are trying to insert.
A long memo field with comma seperated values is not very flexible or easy to extract specific data from.
Could you post the form, without doing the insert, to a page that just shows what values you are getting from the form elements - just to see what you are trying to insert.
A long memo field with comma seperated values is not very flexible or easy to extract specific data from.