473,320 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Array to another page

129 100+
Hai guys who can help me with this problem!

a form contain an array with a list of item and i want to display the array items in to another form when the user click a button.

is it possible...

i does some works but i can't retrieve full of the array elements

Expand|Select|Wrap|Line Numbers
  1.  
  2. name(10) as integer
  3.  
  4. for i=1 to l 
  5. name(i)=txtname.text
  6. next
  7. button_clik()
  8. for i=1 to 9
  9. form2.richtext1.text=name(i) & vbcrlf
  10. next
  11. form2.show
  12.  
Thanx in advance
Feb 4 '07 #1
3 1041
willakawill
1,646 1GB
Hi. So you are taking an array of integers
Expand|Select|Wrap|Line Numbers
  1. Dim name(10)  As Integer
and you are assigning a value from your textbox to the second element of this array
Expand|Select|Wrap|Line Numbers
  1. name(i)=txtname.text
I have to assume that txtname contains an integer value for this to work, yet you are calling the array 'name' and the textbox 'txtname' How many values do you want to transfer and are they strings or integers?
Feb 4 '07 #2
iburyak
1,017 Expert 512MB
Change this

[PHP]For i = 1 To 9
Form2.richtext1.Text = Name(i) & vbCrLf
Next[/PHP]
to this

[PHP]For i = 0 To UBound(Name)
Form2.richtext1.Text = Name(i) & vbCrLf
Next[/PHP]

Good Luck.
Feb 4 '07 #3
Killer42
8,435 Expert 8TB
Hai guys who can help me with this problem!
A form contain an array with a list of item and i want to display the array items in to another form when the user click a button.
is it possible...
i does some works but i can't retrieve full of the array elements
Expand|Select|Wrap|Line Numbers
  1. name(10) as integer
  2. for i=1 to l 
  3.   name(i)=txtname.text
  4. next
  5. button_clik()
  6. for i=1 to 9
  7.   form2.richtext1.text=name(i) & vbcrlf
  8. next
  9. form2.show
  10.  
Some things to keep in mind.
  • As willakawill indirectly pointed out, the Name() array should almost certainly be String type, rather than Integer.
  • At best, this technique will only show the last entry, because each time around the loop, you are replacing the contents of RichText1. What you (probably) should be doing is appending each entry to the end of what's currently in there.
  • We can generally help more if you directly copy and paste your code into the message here. Typing it in like this leaves too much room for errors which weren't in the original code. For example, there's unlikely to be a clik event on your button control. (And believe it or not, you might actually fix an error by typing it differently here, making it impossible for us to identify the problem.)
  • Although this is a very minor point, I'd generally recommend using vbNewLine rather than vbCrLf.
Feb 5 '07 #4

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

Similar topics

4
by: pablo | last post by:
Dear News Groupers, I'am trying to send a php array with a hidden input field from a form to another script. The array is NOT made directly by way of <input name="arrayname" />. The array is...
4
by: LRW | last post by:
I'm not even sure this is possible, and if it is, I'm having a hard time focusing on a function that would make it work. What I have is a dynamically generated form with dozens of rows from a...
2
by: John Wilson | last post by:
Hello friends, I have this dynamic array(shown below) that I need to match to values (1 - 10) that I am returning from the database via DSN connection object. The values I need to match are on...
3
by: Francois | last post by:
Is it possible to automatically create an array on load page? I want my script to be external. (<script language="JavaScript" src="somescript.js"></script>) Several pages should use this...
4
by: Michael Kirchner | last post by:
Hi everybody The output of my multiple dimension array is quite confusing. Im declaring an array, store some values in it and then I save the array in a session variable. On an other page I...
9
by: Kareem Nutt | last post by:
I'm fairly new to c++ coming from c, so I'm a little confused. I have the following: Page *pageTable; Desc *descTable; pageTable = new Page; //array of Page objects descTable = new Desc;...
2
by: Knoxy | last post by:
Hi there, Hope someone can help. I've had a look around on the web and found some useful info but not getting this to work... seen lots of different variations PROBLEM: ======== I have a...
21
by: yeti349 | last post by:
Hi, I'm using the following code to retrieve data from an xml file and populate a javascript array. The data is then displayed in html table form. I would like to then be able to sort by each...
4
by: Cerebral Believer | last post by:
Hi I need help! Forgive me I am a PHP newbie. I have a small script that enables me to send a form from an HTML page. I want to use the HTML formatted form because the design of my website is...
2
by: David | last post by:
Hey can anyone help me convert a javascript array into a ruby array. Ive been struggling with this since friday to no avail. This is the function with the ajax.request call that is supposed to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.