Microsoft Access Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft Access Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 20th, 2004, 06:05 PM
klegesdal klegesdal is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 24 klegesdal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Accessing a rowsource value

I have code that sets the rowsouce of a list box based on a selection of a combo box. The rowsouce in code is equal to the sql string. However I would like to get to the actual value that is displayed in my list box. I tried ...me.mylistbox.value but it didn't work. Any thoughts or references that someone might point me to?

Thanks
kenny

Reply With Quote
  #2  
Old February 21st, 2004, 02:40 AM
pcplayer pcplayer is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 41 pcplayer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 12 m 18 sec
Reputation Power: 5
dim strValue as string

strValue = "Select [primaryKeyID Fieldname],[fieldName] from [tableName]"
combobox.rowsource = strValue


If you have more than one fieldname in your select statement then you need to set
The column count property to the number of fields you have (even if you don't want to view it in your combobox)
then set Column widths to something like this: 0";1"

Reply With Quote
  #3  
Old February 23rd, 2004, 03:33 PM
klegesdal klegesdal is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 24 klegesdal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Actually I was looking for the value that the sql str was pointing to in the table. I finally figured it out...

me.mylistbox.column(column,row)

Thanks for your response.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft Access Help > Accessing a rowsource value


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT