By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,623 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,623 IT Pros & Developers. It's quick & easy.

Pass array elements of a form into a flexGrid

P: 28
Hello !

I have a form called frmAutoTest where i created an arry

Public Step_Result(44) As String

This array holds the pass or fail from a test.
When i set the breakpoints i see that the array from 1-44 is filled with passed or fail.
I also design a second form called frmResult which it has a flexGrid and a print button.
What i want is to pass the data of the array which is in the form frmAutoTest into the flexGrid which is in the frmResult.
Can anyone help me?
Thanks
Mar 29 '07 #1
Share this Question
Share on Google+
6 Replies


vijaydiwakar
100+
P: 579
Hello !

I have a form called frmAutoTest where i created an arry

Public Step_Result(44) As String

This array holds the pass or fail from a test.
When i set the breakpoints i see that the array from 1-44 is filled with passed or fail.
I also design a second form called frmResult which it has a flexGrid and a print button.
What i want is to pass the data of the array which is in the form frmAutoTest into the flexGrid which is in the frmResult.
Can anyone help me?
Thanks
as this is a public array u can use it by creating object of it
drive a loop and assign it to perticular cell with the help of textmatrix property
Mar 29 '07 #2

P: 28
I didn't presented it very well. Actually the array is private . I changed it to public because i couldn't have access to it.

Is the following what you mean?
Public Sub passresult(ByVal passfail() As String)
Dim i As Integer
For i = 1 To 44
Me.flgPrintingResults.set_TextMatrix(1, 1, passfail(i))
Next

End Sub
Mar 29 '07 #3

pureenhanoi
100+
P: 175
Hello !

I have a form called frmAutoTest where i created an arry

Public Step_Result(44) As String

This array holds the pass or fail from a test.
When i set the breakpoints i see that the array from 1-44 is filled with passed or fail.
I also design a second form called frmResult which it has a flexGrid and a print button.
What i want is to pass the data of the array which is in the form frmAutoTest into the flexGrid which is in the frmResult.
Can anyone help me?
Thanks
insert this code into frmResult
Expand|Select|Wrap|Line Numbers
  1. private sub form_load()
  2. dim i as integer
  3. flexGrid.rows = 1
  4. flexGrid.cols = 1
  5. flexGrid.TextMatrix(0,0) = "Pass or fail"
  6. for i=1 to 44
  7.      flexGrid.AddItem Step_Result(i)
  8. next i
  9. end sub
  10.  
Mar 29 '07 #4

vijaydiwakar
100+
P: 579
I didn't presented it very well. Actually the array is private . I changed it to public because i couldn't have access to it.

Is the following what you mean?
Public Sub passresult(ByVal passfail() As String)
Dim i As Integer
For i = 1 To 44
Me.flgPrintingResults.set_TextMatrix(1, 1, passfail(i))
Next

End Sub
ya some what like that
Mar 29 '07 #5

P: 28
Thanks for the help.
It doesn't work exactly like this but you gave me an idea.
Mar 29 '07 #6

vijaydiwakar
100+
P: 579
Thanks for the help.
It doesn't work exactly like this but you gave me an idea.
try it
if it is not up to the mark then i'll guide u
Mar 29 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.