A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Viewing expressions in a listbox



 
 
Thread Tools Display Modes
  #1  
Old April 19th, 2010, 04:32 AM posted to microsoft.public.access.queries
Peter Stone
external usenet poster
 
Posts: 65
Default Viewing expressions in a listbox

Access 2003, XP Pro, semi-novice

I presume that I need to solve this using a query.

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

=[Preposition] & " " & [Vehicle] & "is" [Color]

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

Record 1
Preposition: My
Vehicle: Car
Color: Blue

Record 2
Preposition: His
Vehicle: Bicycle
Color: Red

I list the expressions in a list box and select them into a textbox. By
selecting records from table "Words" by a combo box and displaying the fields
in hidden text boxes, I can get the following results in the textbox:

My Car is Red
His Bicycle is Blue

My question is:
Instead of viewing the expression results one-by-one in the textbox, how can
I display them all in a list box.

In case you're wondering why? My expressions are quite different from this:
longer, more complicated, and more varied. I gave this example to keep it
simple.

Thanks

Peter
  #2  
Old April 19th, 2010, 05:20 AM posted to microsoft.public.access.queries
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Viewing expressions in a listbox

Peter,

Create your expression in a query and use the query as the recordsource for
your list box.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Peter Stone" wrote in message
...
Access 2003, XP Pro, semi-novice

I presume that I need to solve this using a query.

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

=[Preposition] & " " & [Vehicle] & "is" [Color]

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

Record 1
Preposition: My
Vehicle: Car
Color: Blue

Record 2
Preposition: His
Vehicle: Bicycle
Color: Red

I list the expressions in a list box and select them into a textbox. By
selecting records from table "Words" by a combo box and displaying the
fields
in hidden text boxes, I can get the following results in the textbox:

My Car is Red
His Bicycle is Blue

My question is:
Instead of viewing the expression results one-by-one in the textbox, how can
I display them all in a list box.

In case you're wondering why? My expressions are quite different from this:
longer, more complicated, and more varied. I gave this example to keep it
simple.

Thanks

Peter

  #3  
Old April 19th, 2010, 05:35 AM posted to microsoft.public.access.queries
Peter Stone
external usenet poster
 
Posts: 65
Default Viewing expressions in a listbox

Sorry Gina I simplified it too much; every expression is different. e.g.

=[Preposition] & " " & [Color] & " " & [Vehicle] has a puncture

Your green truck has a puncture

Thanks

Peter

"Gina Whipp" wrote:

Peter,

Create your expression in a query and use the query as the recordsource for
your list box.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Peter Stone" wrote in message
...
Access 2003, XP Pro, semi-novice

I presume that I need to solve this using a query.

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

=[Preposition] & " " & [Vehicle] & "is" [Color]

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

Record 1
Preposition: My
Vehicle: Car
Color: Blue

Record 2
Preposition: His
Vehicle: Bicycle
Color: Red

I list the expressions in a list box and select them into a textbox. By
selecting records from table "Words" by a combo box and displaying the
fields
in hidden text boxes, I can get the following results in the textbox:

My Car is Red
His Bicycle is Blue

My question is:
Instead of viewing the expression results one-by-one in the textbox, how can
I display them all in a list box.

In case you're wondering why? My expressions are quite different from this:
longer, more complicated, and more varied. I gave this example to keep it
simple.

Thanks

Peter

  #4  
Old April 19th, 2010, 06:08 AM posted to microsoft.public.access.queries
Peter Stone
external usenet poster
 
Posts: 65
Default Viewing expressions in a listbox

Hm. I wasn't paying attention My, Your, and His are, of course, possessive
adjectives not prepositions. Let's continue to make out they are prepositions
for the purpose of solving this.

Peter
  #5  
Old April 19th, 2010, 07:05 PM posted to microsoft.public.access.queries
vanderghast
external usenet poster
 
Posts: 593
Default Viewing expressions in a listbox

You can none the less create a computed expression in a query, and base you
listbox on that created query, isn't it?


Vanderghast, Access MVP

"Peter Stone" wrote in message
...
Hm. I wasn't paying attention My, Your, and His are, of course, possessive
adjectives not prepositions. Let's continue to make out they are
prepositions
for the purpose of solving this.

Peter


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:32 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.