Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Multiple Checkbox Values as Text into Memo Field

Posted 20 Mar 2002 19:05:20
1
has voted
20 Mar 2002 19:05:20 Jean-Marie Bonnar posted:
Hello,

I was wondering if anyone might be able to explain how to submit multiple checkbox values as a comma delimited list into one Access Memo field. For instance, a list of member interests such as Shows, Club Events, Club Meets.

Furthermore, I need to pass the form data to a second page which sends off an HTML formatted email. I know how to send off the formatted email, but I am wondering how I would be able to display this checkbox gathered information on this email page as a list once gathered, as the information will be submitted to the second page from the form and not the database.
Any help would be greatly appreciated.

Many thanks,

Jean-Marie

Replies

Replied 21 Mar 2002 05:10:38
21 Mar 2002 05:10:38 Michael Rudge replied:
you have to concat a an insert statement where you send the values to a sub procedure on the post of the form.
At the top of the page 'catch' the post,place this under the connection include that UD created but above any html. <% If Request.ServerVariables("REQUEST_METHOD" = "POST" then
'gather the info from your form
Dim strInfo
strInfo = Request.Form("chkBox1"
strInfo = strInfo & Request.Form("chkBox2"
'etc
'then you need to create a recordset
set rsRecord = Server.CreateObject("ADODB.Recordset"
'use the connection string
rsRecord.ActiveConnection = MM_UD_STRING
rsRecord.Open "TableName", ,3,3
rsRecord.Addnew
'move information
rsRecord("MemoName" = strInfo
rsRecord.Close()
Set rsRecord=Nothing
End if
this should do it....
I would then just call it from the DB when the next page loads and place it where you want.If you are wanting to display like Hobbies: Mountain Biking
Favorite Movie: The Matrix
I would store them in different fields in the DB.
HTH

Michael Rudge
Replied 22 Mar 2002 18:07:39
22 Mar 2002 18:07:39 Jean-Marie Bonnar replied:
Michael,

Thank you for responding to my post and for the information you gave me, Michael. I did try what you said, but unfortunately after three hours couldn't get it to work properly (everything else inserted into the database but that) so I've redesigned my database to cope with it for now. I do appreciate you pointing me in the right direction.

Thank you,

Jean-Marie

Reply to this topic