Viewing expressions in a listbox

P

Peter Stone

Access 2003, XP pro, semi-novice

I have a table "Expression" where records are similar to the one below:

[Adjective] & " " & [vehicle] & " is " & [color]
[Adjective] & " " & [color] & " " & [vehicle] & " has a puncture"
[Adjective] & " " & [vehicle] & " has a " & [color] & " stripe"

I have another table "Word" similar to that below:

WordID: 1
Adjective: My
Vehicle: car
Color: blue

WordID: 2
Adjective: His
Vehicle: bicycle
Color: red

WordID: 3
Adjective: Your
Vehicle: truck
Color: green

I list the expressions in a list box. The AfterUpdate event of the list box
puts an = sign in front of the selected expresssion and makes it the control
source of a textbox.

By selecting records from table "Word" by combo box and displaying the
fields in hidden text boxes, I can view the following in the textbox:

My car is blue
His red bicycle has a puncture
Your truck has a green stripe

How can I also view the results of all the expressions in a listbox? I've
made several attempts but I don't know how to do it.

My actual expressions are quite different from this:
longer, more complicated, and more varied. I made up this example to keep it
simple.

Thanks

Peter
 

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

Top