473,322 Members | 1,699 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,322 software developers and data experts.

dynamically created controls


I'm having trouble getting my program to do calculations on the input from
dynamic textboxes. I got everything to work with putting the textboxes on
the form, but I don't know how to store the input so I can do calculations
on it. I have an array for quantity, price, and extended price. I need to
multiply the input value in quantity by the input value in price and display
the totals in the extended price column. Can someone help me with this?
I've tried to get the input values from the textboxes in the same way that
it is done with regular textboxes, but it doesn't work with the dynamic
textboxes. I keep getting the error message that it's not set to an
instance of an object when I try to get the text property of the textbox.

here's how I did the textboxes if it makes it any difference:

txtQuantity(mintCurrent) = New TextBox

pntCurrent = New Point(cintCol1, mintYValue)

With txtQuantity(mintCurrent)

..Visible = True

..Width = 70

..Height = 20

..Location = pntCurrent

End With

Me.pnlItems.Controls.Add(txtQuantity(mintCurrent))

Thank you


Nov 21 '05 #1
1 968
You have shown code for the creation of the text box, but you have not shown
where you are trying to access the control to get or set its text property.

"sympatico" <fe******@a1vbcode.com> wrote in message
news:kH*******************@news20.bellglobal.com.. .

I'm having trouble getting my program to do calculations on the input from
dynamic textboxes. I got everything to work with putting the textboxes on
the form, but I don't know how to store the input so I can do calculations
on it. I have an array for quantity, price, and extended price. I need
to
multiply the input value in quantity by the input value in price and
display
the totals in the extended price column. Can someone help me with this?
I've tried to get the input values from the textboxes in the same way that
it is done with regular textboxes, but it doesn't work with the dynamic
textboxes. I keep getting the error message that it's not set to an
instance of an object when I try to get the text property of the textbox.

here's how I did the textboxes if it makes it any difference:

txtQuantity(mintCurrent) = New TextBox

pntCurrent = New Point(cintCol1, mintYValue)

With txtQuantity(mintCurrent)

.Visible = True

.Width = 70

.Height = 20

.Location = pntCurrent

End With

Me.pnlItems.Controls.Add(txtQuantity(mintCurrent))

Thank you

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Kiyomi | last post by:
Hello, I create a Table1 dynamically at run time, and at the same time, I would like to create LinkButton controls, also dynamically, and insert them into each line in my Table1. I would...
0
by: John Crowley | last post by:
I'm having an odd problem with viewstate and a dynamically created control inside a repeater template. Basically, I have a repeater setup like this in the aspx:
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am have facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the...
1
by: Kamal Jeet Singh | last post by:
Hi Friends !! I am facing problem in controlling the dynamically created controls on web page. The problem Scenario is Scenario:- My requirement is to load the web user controls on the web...
2
by: Chad | last post by:
I have a problem that I am desperate to understand. It involves dynamically adding controls to a Table control that is built as a result of performing a database query. I am not looking to...
1
by: Marcus | last post by:
I have a problem maybe one of you could help me with. I've created a data entry screen with lots of dynamically-created client-side controls. I create HTML texboxes client-side by assigning a...
5
by: Amoril | last post by:
I've read quite a few different message on various boards and for some reason I'm still having trouble wrapping my head around this viewstate maintenance and trying to get these dynamically created...
9
by: Chris | last post by:
I am dynamically adding a user control to each row in a gridview. The reason I am doing it dynamically is the user control is different depending on certain data in the gridview. The gridview...
4
by: mohaaron | last post by:
I can think of a lot of reasons why this might need to be done but as far as I can tell it's not possible. I've been looking for a way to add HtmlTableRows to a table using a button click for a...
1
by: semomaniz | last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: 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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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.