Solved

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

Posted on 2008-10-28
5
174 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
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 33

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 119

Expert Comment

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

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

Accepted Solution

by:
Rey Obrero earned 350 total points
ID: 22821191
typo

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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now