Solved

How to get lstWs.Comlumn(1) value...

Posted on 2008-10-28
5
179 Views
Last Modified: 2013-11-27
   For i = 1 To Forms!fFiles!lstWs.ListCount - 1
        If Forms!fFiles!lstWs.Selected(i) = True Then   '<--- if selected
            Debug.Print Forms!fFiles!lstWs.ItemData(i) '<-- this gives the value of 1st column ok.
            Debug.Print Forms!fFiles!lstWs.Column(1).Column(1) '<-- this fails
        End If
    Next i

Question: What is right syntax for

Debug.Print Forms!fFiles!lstWs.Column(1).Column(1)

Thank you.
0
Comment
Question by:Mike Eghtebas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 46

Expert Comment

by:tbsgadi
ID: 22820527
Hi eghtebas,

Maybe Debug.Print Forms!fFiles!lstWs.Column(1)
Depends waht you want to see.


Gary
0
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 150 total points
ID: 22820532
Forms!fFiles!stWs.Column(i, 0)

But I gotta say this: If this is Mike posting - this is elementary Access 101 ... a rather odd question for a Genius in the Access TA.

0
 
LVL 34

Author Comment

by:Mike Eghtebas
ID: 22820601
Hi Gary,

I want to see the second column of the for the selected row (item)

No      Name
1          A
2          B    '<-- if this row is selected,  Forms!fFiles!lstWs.Selected(i) = True
3         C

Then I want th value of B.

Hi LSMConsulting,

But I am not able to get the right value yet. Maybe becuase it is 5 am here.

Forms!fFiles!stWs.Column(i, 0)    gives me null
Forms!fFiles!stWs.Column(i, 1)    also gives me null

Mike


0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 22821134
it should be the other way around

Forms!fFiles!stWs.Column(0,i)    
Forms!fFiles!stWs.Column(1,i)    
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 350 total points
ID: 22821191
typo

Forms!fFiles!lstWs.Column(0,i)
Forms!fFiles!lstWs.Column(1,i)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question