![]() |
Detect Records Value |
Post Reply ![]() |
Author | |
moe188 ![]() Senior Member ![]() Joined: 27 March 2006 Status: Offline Points: 220 |
![]() ![]() ![]() ![]() ![]() Posted: 26 September 2007 at 8:41pm |
Hi,
I have a reportcontrol, with a number X of rows, and 5 columns. how can I be able to retrieve the value of each column of each row? thank you. Please HELP!!!! ![]() |
|
![]() |
|
joeliner ![]() Senior Member ![]() ![]() Joined: 09 June 2006 Status: Offline Points: 273 |
![]() ![]() ![]() ![]() ![]() |
play around with this. works for me fine. :)
Dim str As String
Dim RecordItem As ReportRecordItem For Each RecordItem In Row.Record If wndReportControl.Columns(wndReportControl.Columns.Count - 1).Index = 11 Then 'check if row or group row str = Row.Record.Item(wndReportControl.Columns.Count).value End If Next regards,
|
|
![]() |
|
moe188 ![]() Senior Member ![]() Joined: 27 March 2006 Status: Offline Points: 220 |
![]() ![]() ![]() ![]() ![]() |
no luck,
I tried your code, but it did not do anything at all.
![]() |
|
![]() |
|
sserge ![]() Moderator Group ![]() Joined: 01 December 2004 Status: Offline Points: 1297 |
![]() ![]() ![]() ![]() ![]() |
Just enhance this and iterate everything, like below:
-- WBR, Serge |
|
![]() |
|
moe188 ![]() Senior Member ![]() Joined: 27 March 2006 Status: Offline Points: 220 |
![]() ![]() ![]() ![]() ![]() |
Hi, Serge
I cant get it to work, any code that I used will return an empty string. so I will appreciate if you can help me solving this problem ASAP
![]() Note: I am tryint to read the content of each column of each row in order to save data into my database... (except if there is another way in doing so).
Thank you
|
|
![]() |
|
sserge ![]() Moderator Group ![]() Joined: 01 December 2004 Status: Offline Points: 1297 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Your RecordItem.Value may be not a String, but something else like integer - this could be a reason of incorrect type cast. Try using Debug.Print RecordItem.Value without an additional convertation. -- WBR, Serge |
|
![]() |
|
moe188 ![]() Senior Member ![]() Joined: 27 March 2006 Status: Offline Points: 220 |
![]() ![]() ![]() ![]() ![]() |
okay, I tried the following code, but I was only able to display the value of record for the first row.
code:
Dim Record As ReportRecord
For Each Record In LstMed.Records MsgBox LstMed.FocusedRow.Record(M1).Value Next this code will display the same value for the number of records existing in the reportcontrol. WHY?? something is missing... how can I be able to display for the rest of reocrds?
|
|
![]() |
|
sserge ![]() Moderator Group ![]() Joined: 01 December 2004 Status: Offline Points: 1297 |
![]() ![]() ![]() ![]() ![]() |
Why did you mentioned FocusedRow in code???
In this case try only MsgBox Record(M1).Value -- WBR, Serge |
|
![]() |
|
moe188 ![]() Senior Member ![]() Joined: 27 March 2006 Status: Offline Points: 220 |
![]() ![]() ![]() ![]() ![]() |
thank you,
it works just fine.
![]() |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |