I have several pages that can be printed out. I want to be able to "Print ALL" as well.
Private Sub bPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bPrint.Click
Dim oCRV as New ReportDocument
if me.cbPage1.checked then
loadPage1(oCRV)
elseif...
Not clear enough, sorry.
The loading of the list box works fine. I have the problem when tring to get one of the fields in the listbox not used as "DisplayMember" or "ValueMember". I am trying to get the value of "street".
The following code is me loading a listbox with a table. I have no problem with the retrieving data if data has information, but if the field is empty I get a error. how can I check the field in a listbox first for DBnull?
'***1. load listbox from table
vStr = "Select social&' '&name as entry...
Another way is to initialize in beginning
Private oP1_TAB(4) As TextBox
then in load method
oP1_TAB(0) = textbox_Zero
oP1_TAB(1) = textbox_One
oP1_TAB(2) = textbox_Two
oP1_TAB(3) = textbox_Three
For x = 0 To 3
If oCont.Rows(x).IsNull("docu") Then
oP1_TAB(x).Text = Nothing
Else...
Sorry, I guess you needed the function too?
Private Function Obj(ByVal sender As System.Object, ByVal cControlName As String) As Control
Dim i As Integer
For i = 0 To sender.controls.Count - 1
If sender.Controls(i).Name.toUpper = cControlName.ToUpper Then
Return sender.Controls(i)
End If...
found a way myself
Dim strg As String
Dim i As Integer
For i = 1 To 3 Step 1
strg = "textbox" + i.ToString
Obj(Me, strg).Text = "Larry" + i.ToString
Next
I have a textbox "TB1" that I want to fill with "This Stuff"
x = 1
str = "TB"+x.tostring
?? str.text ?? = "This Stuff"
what do I use to show "str" is a control name?
closer
On the first time through it after the assign statement, it goes to "next" then straight to "Catch" statement with the error saying "Specified cast is not valid."
I did get it to work with
For x = 0 To Me.tabPAGE1.Controls.Count - 1
sStmt = " document = '" +...
One a form I have 20 textboxes. How can I put the save in a loop.
for x = 1 to 20
sStmt = "update textlist set "
****************
sStmt += " document = '"+??(textbox_x)??+"'"
****************
sStmt += " where item = "+item_no
Sqlexe(sStmt, oConn)
next
Actually I spoke to soon. I am getting
in debugger is says "Connection.ServerVersion <error: an exception of type: {System.InvalidOperationException} occurred> String"
when displaying message it says "Object reference not set to an instance of an object"
[RESOLVED] Oracle Connection string syntax
Dim OraStr As String = "Data Source=Oracle8i;Integrated Security=yes"
OR
dim OraStr As String = "Provider=""MSDAORA.1"";User ID=dev;Data Source=testdb;Password=dev"
I am using oracle8i but that should be provider shouldn't it? the MSDAORA.1 is...
when running program I can see all 9 items of data are loaded into myComboBox, but when it displays on the screen all I get is 9 instances of "Test1.Global+ListCodes". What do I need to use in the DisplayMember spot?
I've tried original field name of "Name1", "test.codeName"
PublicStructure...
I have set up a form that I can load a Datatable in, but how do I return the index number so I know what the user selected. If possible I would rather not use a global variable.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.