![]() |
Detect Records Value |
Post Reply
|
| Author | |
moe188
Senior Member
Joined: 27 March 2006 Status: Offline Points: 225 |
Post Options
Thanks(0)
Quote Reply
Topic: Detect Records ValuePosted: 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 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 September 2007 at 11:03am |
|
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: 225 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 September 2007 at 2:04pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 01 October 2007 at 6:49pm |
|
Just enhance this and iterate everything, like below:
-- WBR, Serge |
|
![]() |
|
moe188
Senior Member
Joined: 27 March 2006 Status: Offline Points: 225 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 October 2007 at 4:03pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 09 October 2007 at 4:20pm |
|
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: 225 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 October 2007 at 3:10pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 October 2007 at 6:19pm |
|
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: 225 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 October 2007 at 6:29pm |
|
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 |