Copy and Paste in fields

D

DROPaul

Can anyone tell me how to copy several values from a combo list into a field.
I want the user to be able to select several options from the list to be put
into 1 memo/text field for output in a report. Each option being entered on a
new line.
 
B

BCampbell

A combo box can only have one value so if you need several
values, you will need several combo boxes. You will then
have to concatenate your values and populate your
memo/text field from that.
 
J

John Vinson

Can anyone tell me how to copy several values from a combo list into a field.
I want the user to be able to select several options from the list to be put
into 1 memo/text field for output in a report. Each option being entered on a
new line.

If you want a Report, I would strongly suggest that you should NOT
store the data redundantly in a Memo field. It sounds like you have a
one-to-many relationship; the selected list items (or better, a unique
ID linking them to the table used as the combo's rowsource) could be
added to a new table related one-to-many to your table. The Report
could then list the selected items in the detail section.

If this isn't satisfactory, it is possible to write VBA code to insert
the selected items into a memo (but copy and paste would not be
involved). Post back with an explanation if that's really what you
want to do.

John W. Vinson[MVP]
 
D

DROPaul

Hi John,

The way you suggested is useful however as the project I am working on
involves an assessment which has a lot of questons with multiple options for
the answers this would involve a lot of tables.

A soluton using VBA would be easier for me to set up than lots of tables.

Cheers

Paul
 
J

John Vinson

Hi John,

The way you suggested is useful however as the project I am working on
involves an assessment which has a lot of questons with multiple options for
the answers this would involve a lot of tables.

A soluton using VBA would be easier for me to set up than lots of tables.

Umm... four tables, I'd say:

Assessments
AssessmentID
<information about the questionnaire as a whole>

Questions ' list of all the questions
QuestionID
Question Text

ValidOptions ' list of valid options for each question
QuestionID
AnswerID
Text

AssessmentOptions ' List of answers chosen for each question
AssessmentID ' which assessment
QuestionID ' which question
AnswerID ' which option was chosen for that question

You'ld have as many records in AssessmentOptions as you have
questions; or if you can choose multiple answers per question, make
all three fields the Primary Key and insert as many answers as you
wish. Does that make sense?


John W. Vinson[MVP]
 
D

DROPaul

That sounds like it might work OK. I'll try it out and see how I get on. If
it doesn't work "I'll be back". Thanks for your help.

Cheers

Paul
 
Top