Oxiegen 88 Basically an Occasional Poster Featured Poster

You need to encase All values in it's own single-quote and separate each column->value with a comma. UPDATE table SET col1 = 'value1', col2 = 'value2' WHERE col3 = 'value3'

Oxiegen 88 Basically an Occasional Poster Featured Poster

Try replacing some of the code with this:

Dim cn As New System.Data.SqlClient.SqlConnection("your connectionstring")
            cn.Open()
            Dim getUser As New System.Data.SqlClient.SqlCommand("select Username from MegaUsers where username=?", cn)
            getUser.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Username", strmegaun))
            Dim resultsReader As System.Data.SqlClient.SqlDataReader
            resultsReader = getUser.ExecuteReader(CommandBehavior.CloseConnection)
            If resultsReader.HasRows Then
                While resultsReader.Read()
                    Response.Write(resultsReader("Username").ToString())
                End While
            End If
            resultsReader.Close()
            resultsReader = Nothing
carrzkiss commented: Thank you so much, 3 days worth of searching, for this one post! You Rock! Keep it up! Carrzkiss +3
Oxiegen 88 Basically an Occasional Poster Featured Poster

Or if you prefer the datareader, here's how it's done.

Private Sub cboPosition_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cboPosition.Click
        scmd = New SqlCommand("SELECT KPIPOSTCODE FROM KKPIPOSITION", sqlcon)

        sqlcon.Open()
        scmd.CommandType = CommandType.Text
        dr = scmd.ExecuteReader(CommandBehavior.CloseConnection)

        If dr.HasRows
                While dr.Read
                        If Not IsDBNull(dr.Item("KPIPOSTCODE")) Then
                                cboPosition.Items.Add(dr.Item("KPIPOSTCODE"))
                        End If
                End While
        End If
        dr.Close()
End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

Most likely problem lies within the DownloadFile method.
Perhaps it's the WebClient that doesn't have access to the file your'e trying to download.
Try adding some credentials to the client.

Dim cli As System.Net.WebClient
            cli.Credentials = New System.Net.NetworkCredential("username", "password")
            cli.DownloadFile("url to file", "local file")
Oxiegen 88 Basically an Occasional Poster Featured Poster

After each da.Update you should add a ds.AcceptChanges.
This commits all changes made to the dataset since the last time a change was made.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Ah. I'm sorry. Try this instead.

WebBrowser1.Document.All("body_plain").SetAttribute("value", Body1)
Webbrowser1.Document.InvokeScript("modified", New Object() {"body_plain", True})
WebBrowser1.Document.All("keywords").SetAttribute("value", KeyWords)
Webbrowser1.Document.InvokeScript("modified", New Object() {"keywords"})

Here's my reference: http://www.dotnetcurry.com/ShowArticle.aspx?ID=194&AspxAutoDetectCookieSupport=1

Oxiegen 88 Basically an Occasional Poster Featured Poster

Well. That's a "just in case" scenario.
If you happen to put the code another event than the listbox's SelectedIndexChanged event, it would be useful to have that just in case no item has been selected from the second listbox.

Oxiegen 88 Basically an Occasional Poster Featured Poster

When you use LEFT JOIN, only those records from that table that matches are included and therefore counted.
Perhaps this could be useful: http://dev.mysql.com/doc/refman/5.1/en/control-flow-functions.html

Oxiegen 88 Basically an Occasional Poster Featured Poster

If the items in the three listboxes share the same index, you can use the SelectedIndex property.

If listbox2.SelectedIndex > -1 Then
   listbox1.SelectedIndex = listbox2.SelectedIndex
   listbox3.SelectedIndex = listbox2.SelectedIndex
End If
Oxiegen 88 Basically an Occasional Poster Featured Poster

See what happens if you add the lines in red.

WebBrowser1.Document.All("body_plain").SetAttribute("value", Body1)
Webbrowser1.Document.InvokeScript("modified('body_plain',true)")
WebBrowser1.Document.All("keywords").SetAttribute("value", KeyWords)
Webbrowser1.Document.InvokeScript("modified('keywords')")
Oxiegen 88 Basically an Occasional Poster Featured Poster

I'm sorry. I was wrong regarding fetching mail through System.Net.Mail namespace.
However, it is possible using the sockets classes in System.Net.Sockets.
Take a look at this.
http://www.developerfusion.com/code/2453/send-receive-emails-using-winsock-and-pop3/

Oxiegen 88 Basically an Occasional Poster Featured Poster

And likewise, you can also recieve mail through the same classes.
Take a look at the SmtpClient class.

kvprajapati commented: Aye! +9
Oxiegen 88 Basically an Occasional Poster Featured Poster

Assuming that your DataGridView is called dgv, then this should do the trick.

Private Sub dgv_CellValueChanged(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles dgv.CellValueChanged
        For i As Integer = 0 To dgv.Rows.Count - 1
            lblPlayerScore1.Text += dgv.Rows(i).Cells(0)
            lblPlayerScore2.Text += dgv.Rows(i).Cells(1)
            lblPlayerScore3.Text += dgv.Rows(i).Cells(2)
            lblPlayerScore4.Text += dgv.Rows(i).Cells(3)
            lblPlayerScore5.Text += dgv.Rows(i).Cells(4)
            lblPlayerScore6.Text += dgv.Rows(i).Cells(5)
            lblPlayerScore7.Text += dgv.Rows(i).Cells(6)
            lblPlayerScore8.Text += dgv.Rows(i).Cells(7)
            lblPlayerScore9.Text += dgv.Rows(i).Cells(8)
            lblPlayerScore10.Text += dgv.Rows(i).Cells(9)
            lblPlayerScore11.Text += dgv.Rows(i).Cells(10)
            lblPlayerScore12.Text += dgv.Rows(i).Cells(11)
        Next
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

Add and change the code in red.

Public Class MainForm
    Private intRetry As Integer = 0
    Private Sub exitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles exitButton.Click
        Me.Close()
    End Sub

    Private Sub PasswordTextBox_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles PasswordTextBox.Enter
        PasswordTextBox.SelectAll()
    End Sub

    Private Sub PasswordTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles PasswordTextBox.TextChanged
        messageLabel.Text = String.Empty

    End Sub

    Private Sub verifyButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles verifyButton.Click
       intRetry += 1

        Dim pass As String = String.Empty
        Dim checkPass As String = String.Empty
        Dim counter
       

        pass = PasswordTextBox.Text.ToUpper()

        If intRetry < 3 AndAlso pass.Equals("MOMO") Then

            If pass.EndsWith(checkPass) Then

                messageLabel.Text = "The correct password was entered. Please click OK to continue."
           
            End If
        ElseIf intRetry >= 3 Then
            MessageBox.Show("The correct password was not entered. Please try again", "Password", _
                MessageBoxButtons.OK, MessageBoxIcon.Information)
        End If

        passwordTextBox.Focus()
    End Sub
End Class
Oxiegen 88 Basically an Occasional Poster Featured Poster

Select R.*, P.HphoneNum, P.HeirHpNum from PendingReport R INNER JOIN PatientTable P ON P.PatientID = R.PatientID

Oxiegen 88 Basically an Occasional Poster Featured Poster
txtBox1.Text = webbrowser1.Document.GetElementById("sample").InnerHtml
Oxiegen 88 Basically an Occasional Poster Featured Poster

By using the property InnerHTML.

Oxiegen 88 Basically an Occasional Poster Featured Poster

e.ClientMousePosition is the position of the mouse pointer depending on the client area, ie the webbrowser control.
So I'm thinking that it's not possible. Or at the very least very very difficult. :|

I'm also thinking that you might have to use the code snippets I've provided to find all clickable elements in the document.
Iterate throgh them until you find one you're looking for and extract the link.
You can then use that link to create an URI object and navigate to it. webbrowser1.Navigate(New Uri("http://a_link"))

Oxiegen 88 Basically an Occasional Poster Featured Poster

Oh, I misunderstood.
The code i provided can only give you the coordinates of where You clicked.
I don't think it's possible to send a click to the browser by coordinates.
Unless someone else has a brilliant idea of how to do that.

Oxiegen 88 Basically an Occasional Poster Featured Poster
' Private class variable to get Document from WebBrowser control.
    Private WithEvents _document As HtmlDocument

    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        _document = WebBrowser1.Document
    End Sub

    Private Sub _document_Click(ByVal sender As Object, ByVal e As HtmlElementEventArgs) Handles _document.Click
        '' Here's the coordinates
        'e.ClientMousePosition
        Dim htmlElement As HtmlElement = _document.GetElementFromPoint(e.ClientMousePosition)
        If htmlElement.GetAttribute("").Contains("") Then
            TextBox.Text = htmlElement.GetAttribute("")
        End If
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

Well. Considering that a page might hold a number of this kind of tags it could prove to be a challenge.
You can use the same technique as I showed you and iterate through all the GetElementsByTagName("img") elements.
And you might have to provide some logic inside the loop to find the specific image you're looking for.

Dim htmlElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img")
        Dim imgList As List(Of String)
        For Each el As HtmlElement In htmlElements
            ' Provide additional logic if necessary
            If Not el.GetAttribute("src").Contains("sample") Then
                TextBox.Text = el.GetAttribute("src")
            End If
        Next
Oxiegen 88 Basically an Occasional Poster Featured Poster

Hmm. Just change the brightness.
Then we go into the territory of painting with the namespace Drawing.
A subject I'm not very good at.

But to steer you in the right direction I found this article: http://www.java2s.com/Tutorial/VB/0300__2D-Graphics/ColorRedGreenBlueHueSaturationBrightnessSector.htm.
Perhaps this will be of some help.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Answered in the PM you also sent.

Oxiegen 88 Basically an Occasional Poster Featured Poster
Dim htmlElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("input")

        For Each el As HtmlElement In htmlElements
            If el.GetAttribute("name").Equals("sample") Then
                TextBox.Text = el.GetAttribute("value")
            End If
        Next
Oxiegen 88 Basically an Occasional Poster Featured Poster

Is the Access database local on you machine or is it placed on a network share?
If it's local then you need to include the .MDB file in the deployment project so that it too is copied along with your application.

What tool are you using to create a setup?

Oxiegen 88 Basically an Occasional Poster Featured Poster

Perhaps something like this:

If txtSearch.Text.Equals("") Then
                PurchaseDt.DefaultView.RowFilter = ""
        Else
                PurchaseDt.DefaultView.RowFilter = "PUrchaseID=" & Integer.Parse(txtSearch.Text)
        End If
Oxiegen 88 Basically an Occasional Poster Featured Poster

Guyz I need help.. I'm a newbie in vb.net 2008..I have a form for User Account Maintenance and I want to transfer the Data of the specified Cell of the Datagridview once it's selected by clicking the mouse. How can I transfer it to textbox? Please help me.

DataGridView has an event called CellClick.
You can use that to extract the value of the cell you clicked.
Ex:

Private Sub dgv_CellClick(ByVal sender As Object, ByVal e As DataGridViewCellEventArgs) Handles dgv.CellClick
        txtBox.Text = dgv.Item(e.ColumnIndex, e.RowIndex).Value.ToString
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

First. If you are using a Primary Key in Access 2000, then you don't need to provide that in your INSERT statement.
Access 2000 automatically adds a new record with a new Primary Key value.
That makes all the records in the database unique.

Second. There is probably a very clever way of doing what you ask for.
But this is how I would do it.

Create a method that takes any number of arguments that you need to identify a record as unique and has a return value type of Boolean.
Read the database from this method, and if the record exists, as defined by the supplied arguments, then the method should return true.

Private Function RecordExists(ByVal value1 As String, ByVal value2 As String....) As Boolean
            Dim bolReturnValue As Boolean = False
            Dim reader As OleDbDataReader
            Mycn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\ameya\WindowsApplication2\portfolio.mdb")
            Mycn.Open()
            SQLstr = String.Format("SELECT * FROM p1 WHERE col1 = '{0}' AND col2 = '{1}'", value1, value2)
            Command = New OleDbCommand(SQLstr, Mycn)
            reader = Command.ExecuteReader(CommandBehavior.CloseConnection)
            If reader.HasRows Then
                        bolReturnValue = True
            End If
            reader.Close()

            return bolReturnValue
End Function

Call this method from your Add button event before you execute the code for storing a new record. If Not RecordExists(TextBox1.Text, TextBox2.Text) Then 'Code for storing

Oxiegen 88 Basically an Occasional Poster Featured Poster

Create a new Class Library project.
Then add a reference to System.Windows.Forms.
Now you're free to add and design windows forms to that project.
Compile.

In your current project, add a reference to the newly compiled Class Library binary (dll) and you can call methods and show forms as usual.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Why not load the XML file into an XmlDocument?
From there you can create an XmlNodelist and iterate through it until you find the node you're looking for.
When you find it you can extract that XmlElement from the XmlNodelist and add some logic to extract the values.
This is a quick and dirty example.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim doc As XmlDocument = New XmlDocument
        doc.Load("xmlFile.xml")
        Dim nodeList As XmlNodeList = doc.GetElementsByTagName("Product")
        LoopThroughXmlDoc(nodeList)
    End Sub

    Private Sub LoopThroughXmlDoc(ByVal nodeList As XmlNodeList)
        For Each elem As XmlElement In nodeList
            If elem.HasChildNodes Then
                LoopThroughXmlDoc(elem.ChildNodes)
            Else
                '' Extract the information
                If elem.HasAttribute("AssetID") Then
                    'elem.Attributes("AssetID").Value.ToString()
                ElseIf elem.HasAttribute("AttributeID") Then
                    'elem.Attributes("AttributeID").Value.ToString()
                End If
            End If
        Next
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

it is telling me rows is not declared in this coding if I change it to datarow is says that Length is not a member of System.Data.DataRows

I'm sorry, that line should state If zipcodeRows.Length > 0 Then

I set this up as a module my question is about this, on my login all they put in is a username and password how will I assign the Staffid and their Last name to it? Silly question I am sure, but I am a bit lost on it as I am suspecting if I was keeping their username in the Module I would assign it similar to

Dim username.Textbox = strUsername

Correct me if I am off on this constructor if you would please and thank you so much for all your help.

I'm sure that you have code in place to verify the username and password against the database.
You might wanna modify that slightly so that if it's a successful verification, then the return would contain information so that you can assign the public variables intStaffId and strLastname.
For example:

Private Sub VerifyLogin(Username As String, Password As String)
   If Not Username.Equals("") AndAlso Not Password.Equals("") Then
      Dim verifyRows() As DataRow
      verifyRows = yourdataset.Tables("Staff").Select("Username = '" & Username & "' AND Password = '" & Password & "'")
      If verifyRows.Length > 0 Then
         intStaffId = verifyRows(0).Item("StaffId")
         strLastName = verifyRows(0).Item("LastName")
      End If
   End If
End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

Here a small suggestion of how to read from textfiles.
It's just a small change of what you showed us in your original post.
And if you're looking for specific information stored in the files you can simply add an If statement. See code in red.

Dim stream As FileStream = Nothing
        Dim tr As TextReader = Nothing
        Dim line As String = ""
        Dim fileInput() As String

        If NameOfAccount.Equals("Savings") Then
            stream = New FileStream("csvSAVINGS.TXT", FileMode.Open)
        ElseIf NameOfAccount.Equals("Checkings") Then
            stream = New FileStream("csvCHECKKINGS.TXT", FileMode.Open)
        End If
        tr = New StreamReader(stream)

        While tr.Peek <> -1
            line = tr.ReadLine()
            If line.Contains("string to search for") Then
                tran = New Transaction()
                fileInput = line.Split(","c)
                tran.TransactionDate = fileInput(0)
                .......
            End If
        End While
Oxiegen 88 Basically an Occasional Poster Featured Poster

I understand how to add a module from the add item menu, my problem is I do not understand what I would be needing to use in it or how to use it to collect the username and staffid to carry through the application throughout the entire workday. As the StaffId and the Preferably their Last Name which is all related in the database need to be displayed and also printed on all documents they print from the application.

I was responding as to your first query on how to carry StaffId and Last Name through all forms.
In your login system you simply assign values to these variables and you can then use them from anywhere else in your program.

Module nameOfModule
   Public intStaffId As Integer
   Public strLastName As String
End Module

Truth is I may not even be doing this in the most optimal way possible. As what I need is a text box that they put in the clientid hit search if it comes up it will bring up on a seperate form the case file for that client they searched for, if not it routes to a different form to add them.

Here's one idea. In your Search buttons click event.

Private sub bnSearch_Click(ByVal sender As Object, ByVal e As EventArgs)
   If txtClientIdSearch.Text.Equals("") Then Exit Sub

   Dim con As MySqlConnection = New MySqlConnection("connectionstring")
   Dim da As MySqlDataAdapter = Nothing
   Dim SQL As String = "SELECT * FROM hinfo WHERE clientid1 = '" & …
Oxiegen 88 Basically an Occasional Poster Featured Poster

On lines 224 and 361:
Add DataGridView1.Update() below them.

------------------------------

Please disregard my post. Totally wrong. :)

Oxiegen 88 Basically an Occasional Poster Featured Poster

Instead of using GetUpperBound, try using Length.
See code in red.

Sub SaveFile(ByVal func As String, ByVal ac As Array, ByRef acc1 As Account, ByRef count As Double)

            Dim sa As IO.StreamReader = IO.File.OpenText("D:\Documents and Settings\My Documents\VB-Textfiles\Object\ACCOUNTS.txt")
            Dim sr As IO.StreamWriter = IO.File.CreateText("TEMP.TXT")
            If func = "Open" Then
                Do While sa.Peek <> -1
                    acc1 = New Account
                    Dim a = sa.ReadLine
                    If a = Nothing Then
                        Exit Do
                    Else
                        Dim line() = a.Split(","c)
                        acc1.DateNow = line(0)
                        acc1.Name = line(1)
                        acc1.Ammount = line(2)
                        acc1.Type = line(4)
                        If line(4) = "Checking" Then
                            acc1.CheckBalance = line(3)
                        Else
                            acc1.SaveBalance = line(3)
                        End If
                    End If

                    '*****************************************************************************

                    ' *The problem is here says that the redim preserve wont work. Why?.

                    ac(count) = acc1
                    ' x = ac.GetUpperBound + 1
                    ' ReDim Preserve ac(ac.Length + 1)



                    '***************************************************************************

                    count += 1
                Loop
                sa.Close()
                sr.Close()
            Else
            End If
        End Sub
    End Class
    ''Handles the File storing of all transactions
    'Private Sub BtnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click

    'End Sub

End Class

Thanks for the help, If you notice I placed comments where I am returning errors, and I have yet to plug the save sub into the save button because it won't let me call the sub..

Have you tried declaring the SaveFile method as Public?
Just like properties, methods needs to be Public in order to be accessible from outside the class.

Oxiegen 88 Basically an Occasional Poster Featured Poster

No, there's no Color family.
But there is a possibility for choosing colors, one at a time.
You can use a ColorDialog.

If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
    Dim c As Color = ColorDialog1.Color
    form.BackColor = c
End If

Or to put it the codesample I provided earilier:

Dim c As Color = System.Drawing.SystemColors.Control
        If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
            c = ColorDialog1.Color
        End If

        Dim fontName As String = "Arial"
        Dim fontSize As Integer = 14
        Dim fontStyle As System.Drawing.FontStyle = Drawing.FontStyle.Regular
        Dim FS As New Font(fontName, fontSize, fontStyle)

        For Each frm As Form In Application.OpenForms
            frm.BackColor = c
            frm.Font = FS
            frm.Invalidate()  '' Causes a repaint of the form to make sure that the change goes through.
        Next
Oxiegen 88 Basically an Occasional Poster Featured Poster

Try it like this.

Private Sub webbrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)
    If WebBrowser.DocumentTitle.Equals("title of loginpage") Then
        AddHandler CType(sender, WebBrowser).Document.Window.Error, AddressOf Window_Error
        If WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then
            WebBrowser1.Document.All("pass").SetAttribute("value", Password)
            WebBrowser1.Document.All("email").SetAttribute("value", email1)
            WebBrowser1.Document.Forms(0).InvokeMember("submit")
        End If
    ElseIf WebBrowser.DocumentTitle.Equals("title of second page")
        Dim link As String = WebBrowser1.Document.GetElementById("id of link").GetAttribute("href")
        If Not link.Equals("") Then
            WebBrowser1.Navigate(New Uri(link))
        End If
    End If
End Sub

And remember to replace "id of link" to the actual id of the HTML element on the second page.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Ok I will try these could yougive me any help in the module you are talking about? I have not done modules as of yet.

As you would add a class to your project, you can add a module.
A module is just an empty code file that is declared as Module.

Module nameOfModule
   'Here you can collect a bunch of independent and un-related methods.
   'Including constants and publicly declared variables.
End Module

as for the search function I can do a search of my database but it never gives me the fill by textbox it gives me a fillby button as I said I need it to display in a detail view not the normal gridview not sure if that part makes a difference or not.

I'm sorry, but i don't understand what you mean by "fill by textbox" and "fill by button".
I'm assuming that you wish to display the information in a ListView or a DataGridView.
The ListView has a property named View that can be set to Details, which gives it a similar look as a DataGridView.
And the DataGridView can bind to a DataSet to display the data in a spreadsheat similar fashion.

I am sorry also I mis-stated about the zip code thing, I have one table called zipcodes inside it are zip_codes State City County as the structure inside it the key is the zipcode itself. Would that make much difference in the coding you showed me?

Not …

Oxiegen 88 Basically an Occasional Poster Featured Poster

created a login system that works quite well, but I need using the db or settings or a variable keep the logged in staffid and username constant on all the forms through out the forms. I have no idea how to do this. as it is information that in the end also has to be printed on the printout.

Add a module to your project, in it you can declare Public variables to store the staffid and username.

My search problem is I need to do a filter I guess with a dataset search and if it does exist it will pull that record up in detail view for editing or updating. There is a small catch to this though I need it to not overwrite the old data but keep the clientid1 and write a whole new set of information to the table or move the old set to a historical table and write the new set with everything updated and changed and the old information that is propagated to the form to the original table. I tried to do the search with a filter similar to

The Tables property in the DataSet has a Select method that you can use to filter out the contents of your dataset.
It returns an array of DataRow.

Dim row() As DataRow
row = yourdataset.Tables("Clients").Select("<here you enter an SQL where-clause")

My Last Problem is I have tables with all known zipcodes, I need it to when filled out on …

kvprajapati commented: Very very helpful. +9
Oxiegen 88 Basically an Occasional Poster Featured Poster

am developing software using sql database. i want an sql statement that can enable me retrieve data which for example has same surname,save them in an array or dataset and navigate through them.

Private ds As DataSet = Nothing

Private Function CollectData() As Boolean
   Dim con As New SqlConnection("connectionstring")
   Dim da As SqlDataAdapter = Nothing
   ds = New DataSet()
   
   Try
      con.Open()
      da = New SqlDataAdapter("SELECT * FROM table", con)
      da.Fill(ds)
      con.Close()
   Catch ex As Exception
      Return False
   End Try
   Return True
End Function

Private Function FindRecord(Surname As String) As DataRow()
   Dim row() As DataRow

   Try
      row = ds.Tables(0).Select("surname = '" & Surname & "'")
   Catch ex As Exception
      Return Nothing
   End Try
   Return row
End Function
Oxiegen 88 Basically an Occasional Poster Featured Poster

Personally I would seriously consider the security consequences of putting the connection string into an external file.

If I were you, I would follow the advice from Mr. adapost.
It's easy and quite safe, if you also set the Build Action for app.config to Embedded Resource.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Well. I couldn't really see anything wrong with your logic.
However, what can you see when you debug your transaction code and step through each line to see what line creates the NULL reference?
Just put a breakpoint at Private Sub btnTransfer_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTransfer.Click and follow the code.

I know it's unrelated but the first thing I did notice was this.

Sub WriteTransaction(ByVal activity As Transaction)
        CalcBalance(activity)
'This is only a single item array. And nothing really won't be accomplished with the Join method.
        Dim temp() As String = {activity.TransactionDate & "," & activity.DepoOrWith.ToString & "," & _
        activity.TransactionAmount & "," & Balance}
'Try the code in red instead
        Dim temp As String = activity.TransactionDate & "," & activity.DepoOrWith.ToString & "," & _
        activity.TransactionAmount & "," & Balance
        Select Case activity.AcctName
            Case Is = "Savings"
                Dim sw As StreamWriter = File.AppendText("csvSAVINGS.TXT")
                sw.WriteLine(temp)
                sw.Flush()
                sw.Close()
            .....
        End Select
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

Identify the link on the second page and use the returnvalue to perform a webbrowser1.Navigate() from inside the webbrowser1.DocumentCompleted event.

Dim link As String = webbrowser1.Document.GetElementById("id of link").GetAttribute("href")
        webbrowser1.Navigate(New Uri(link))
Oxiegen 88 Basically an Occasional Poster Featured Poster

I'm thinking that's it's possible.
And I'm sure there is a very clever way of managing that.
That said, this is how I would do it:

Dim fontName As String = "Arial"
        Dim fontSize As Integer = 14
        Dim fontStyle As System.Drawing.FontStyle = Drawing.FontStyle.Regular
        Dim FS As New Font(fontName, fontSize, fontStyle)

        For Each frm As Form In Application.OpenForms
            frm.Font = FS
            frm.Invalidate()  '' Causes a repaint of the form to make sure that the change goes through.
        Next
Oxiegen 88 Basically an Occasional Poster Featured Poster

Examine the webbrowsers LocationChanged event and perhaps also the webbrowsers DocumentCompleted event and the ProgressChanged event.

Maybe you can find some clues there as to why the form is not being submitted. Regardless if you use Forms(0) or Forms(1).

Oxiegen 88 Basically an Occasional Poster Featured Poster

In your Form1_KeyDown you can use the e variable and perform some checks on which keys were pressed.

Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
   If e.KeyCode = Keys.Enter Then
      '' Works with both the standard Enter key and the keypad Enter.
      MsgBox("It's the Enter key")
   ElseIf e.KeyCode = Keys.Tab Then
      MsgBox("It's the Tab key")
   End If
End Sub

And if

Oxiegen 88 Basically an Occasional Poster Featured Poster

Sure. If you have a combobox full of different size-values, you can use those to set the size of the font. Dim FontSize As Integer = Cint(ComboSizes.Text)

Oxiegen 88 Basically an Occasional Poster Featured Poster

Post your code for the transfer button and let's take a look.

Oxiegen 88 Basically an Occasional Poster Featured Poster

Instead of CheckState, try using the property Checked.
This will trigger the checkBox16_CheckedChanged event.

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        ListBox1.Items.Add(ListBox1.Items.Count)

        If ListBox1.Items.Count > 5 Then
            checkBox16.Checked = True
        Else
            checkBox16.Checked = False
        End If
    End Sub
Oxiegen 88 Basically an Occasional Poster Featured Poster

Is the form you're trying to submit actually the form you stated on this line: WebBrowser1.Document.Forms(1).InvokeMember("submit") ?
If the page only has one form, then the line should probably read: WebBrowser1.Document.Forms(0).InvokeMember("submit")