I need some help with the following.
I have a form called frmMain that has a couple of icons, one of the icons when clicked loads frmNotes within a Panel, frmNotes has a ListView and i want to load data from a Microsoft Access Database Table into the ListView
I've tried with the following code however it is not working:
Imports System.Data.OleDb
Public Class frmNotes
Public Populate As PsychologicalStateTrackerDataSet
Private Sub frmNotes_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
End Sub
Private Sub frmNotes_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'PsychologicalStateTrackerDataSet.tblNotes' table. You can move, or remove it, as needed.
Me.TblNotesTableAdapter.Fill(Me.PsychologicalStateTrackerDataSet.tblNotes)
For Each Note In PsychologicalStateTrackerDataSet.tblNotes
Dim Populate As New ListViewItem
Populate = ListViewSearch.Items.Add(Note.fldDate)
Populate.SubItems.Add(Note.fldTime)
Populate.SubItems.Add(Note.fldThoughts)
Populate.SubItems.Add(Note.fldEmotions)
Populate.SubItems.Add(Note.fldPhysicalConsequences)
Populate.SubItems.Add(Note.fldScore)
Next
End Sub
End Class