Combo box.. need help

C

combie

I have a combo box that stores question's. Some of these questions may be
pretty long. My problem is when one of the long questions is selected from
the combo box, I get a "#name?" error message. This is followed by the "this
action will reset the current code in break mode" message. I have installed
Access 2000 SP 3. But am still having the same problem. Please please advise.
Thank you.

Access 2000
Windows 2000
 
P

PC Datasheet

Add an unbound textbox to your form. Change the choices in the combobox to
something like the number or topic of each question. Code the AfterUpdate
event of the combobox to display the question in the textbox.
 
C

combie

Sorry, but I do not understand what you mean. Do you want me to ask the user
to enter the topic of question into the text box, which updates the selection
in the combo box and then requeries? But, I want the user to select from the
options and not to enter the data in a text box. In any case, I have tried my
database in Access 2002 and it works fine. The only reason I have to do it in
Access 2000 is because my work computer does not have Access 2002. Please
advise. Thank you.
 
P

PC Datasheet

<<Change the choices in the combobox to something like the number or topic
of each question. Code the AfterUpdate
event of the combobox to display the question in the textbox.>>

The user picks the question# or topic in the cbx and the AfterUpdate event
then displays the question in the textbox. The user does not enter anything
in the textbox. In fact, you would do well to set the locked property of the
textbox to True and the enabled property to False.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com
 
C

combie

I am not certain how to accomplish that. I am a beginner at VBA. Please help.
Thank you.
 
C

combie

Well, I take that back. I managed to get it to work. But, now I am getting
the error message which says "the action will reset the current code in break
mode." This message was the reason I initially posted this thread. Hmm. It
seems to me there may be more to it. I did further research and found that it
is an error fixed with SP3. I have SP3 installed but am still having the same
problem. Any other suggestions? Thanks for your help even on a weekend!
 
P

PC Datasheet

In your table with the questions you need to have a topic or question# for
each question. Do you have that? Create a query that includes QuestionID,
QuestionNum or Topic and Question in that order. On your form, create a
combobox that uses the query as the rowsource. Set the Bound Column property
to 1, the Column Count property to 3 and the Column Widths to 0;2 (or some
size that displays the Question# or Topic);0

Put the following code in the AfterUpdate event of the combobox:
Me!NameOfTheTextbox = Me!NameOfTheCombobox.Column(2)

Steve
PC Datasheet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top