G
Guest
Hello, I have a form called FrmMain that calls a function(LoadAllFormData()) from its formload event. The function is in a module called ProcessFunctions.vb. The function loads all of the frmMain dropdowns with data from a DB. the function is below. The function runs, but no dropdowns are populating with any data. I even tried to set a basic propery like 'TEXT" and I still couldnt get it to work. No errors, just no changes on FRMMAIN. I would imagine it has something to do with active form or something, but I cant seem to get anything to work. Thanks AL
Imports System.Dat
Imports System.Data.OleD
Imports CrystalDecisions.CrystalReports.Engin
Imports System.Windows.Form
Module ProcessFunction
Dim loading As Boolea
Public Function LoadAllFormData(
Dim LitDatabase As New SqlClient.SqlConnectio
Dim SQadapterTime As New SqlClient.SqlDataAdapte
Dim SQadapterPhase As New SqlClient.SqlDataAdapte
Dim SQadapterTask As New SqlClient.SqlDataAdapte
Dim SQadapterActivity As New SqlClient.SqlDataAdapte
Dim SQadapterCLient As New SqlClient.SqlDataAdapte
Dim SQadapterMatter As New SqlClient.SqlDataAdapte
Dim SQLTime As New SqlClient.SqlComman
Dim SQLPhase As New SqlClient.SqlComman
Dim SQLTask As New SqlClient.SqlComman
Dim SQLActivity As New SqlClient.SqlComman
Dim SQLClient As New SqlClient.SqlComman
Dim SQLMatter As New SqlClient.SqlComman
Dim dreader As SqlClient.SqlDataReade
Dim dtTime As New DataTabl
Dim dtPhase As New DataTabl
Dim dtTask As New DataTabl
Dim dtActivity As New DataTabl
Dim dtCLient As New DataTabl
Dim dtMatter As New DataTabl
Dim MainF As New FrmMai
LitDatabase.ConnectionString = "user id=sa;data source=RC0101;persist security info=True;initial catalog=LitigationData;password=SECRET
SQLTime.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLPhase.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLTask.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLActivity.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLClient.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLMatter.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLTime.Connection = LitDatabas
SQLPhase.Connection = LitDatabas
SQLTask.Connection = LitDatabas
SQLActivity.Connection = LitDatabas
SQLClient.Connection = LitDatabas
SQLMatter.Connection = LitDatabas
SQadapterTime.SelectCommand = SQLTim
SQadapterPhase.SelectCommand = SQLPhas
SQadapterTask.SelectCommand = SQLTas
SQadapterActivity.SelectCommand = SQLActivit
SQadapterCLient.SelectCommand = SQLClien
SQadapterMatter.SelectCommand = SQLMatte
' Load Timekeeper Dropdown
SQadapterTime.Fill(dtTime
MainF.DrpTimekeeper().DataSource = dtTim
MainF.DrpTimekeeper().DisplayMember = dtTime.Columns(1).ToStrin
MainF.DrpTimekeeper().ValueMember = dtTime.Columns(0).ToStrin
MainF.DrpTimekeeper().Text = "A TEST
End Functio
Imports System.Dat
Imports System.Data.OleD
Imports CrystalDecisions.CrystalReports.Engin
Imports System.Windows.Form
Module ProcessFunction
Dim loading As Boolea
Public Function LoadAllFormData(
Dim LitDatabase As New SqlClient.SqlConnectio
Dim SQadapterTime As New SqlClient.SqlDataAdapte
Dim SQadapterPhase As New SqlClient.SqlDataAdapte
Dim SQadapterTask As New SqlClient.SqlDataAdapte
Dim SQadapterActivity As New SqlClient.SqlDataAdapte
Dim SQadapterCLient As New SqlClient.SqlDataAdapte
Dim SQadapterMatter As New SqlClient.SqlDataAdapte
Dim SQLTime As New SqlClient.SqlComman
Dim SQLPhase As New SqlClient.SqlComman
Dim SQLTask As New SqlClient.SqlComman
Dim SQLActivity As New SqlClient.SqlComman
Dim SQLClient As New SqlClient.SqlComman
Dim SQLMatter As New SqlClient.SqlComman
Dim dreader As SqlClient.SqlDataReade
Dim dtTime As New DataTabl
Dim dtPhase As New DataTabl
Dim dtTask As New DataTabl
Dim dtActivity As New DataTabl
Dim dtCLient As New DataTabl
Dim dtMatter As New DataTabl
Dim MainF As New FrmMai
LitDatabase.ConnectionString = "user id=sa;data source=RC0101;persist security info=True;initial catalog=LitigationData;password=SECRET
SQLTime.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLPhase.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLTask.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLActivity.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLClient.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLMatter.CommandText = "SELECT Timekeeper, EmpName FROM V_LiTimekeeper UNION SELECT 'Littimedetail.timekeeper', '-ALL-' FROM V_LiTimekeeper ORDER BY EmpName
SQLTime.Connection = LitDatabas
SQLPhase.Connection = LitDatabas
SQLTask.Connection = LitDatabas
SQLActivity.Connection = LitDatabas
SQLClient.Connection = LitDatabas
SQLMatter.Connection = LitDatabas
SQadapterTime.SelectCommand = SQLTim
SQadapterPhase.SelectCommand = SQLPhas
SQadapterTask.SelectCommand = SQLTas
SQadapterActivity.SelectCommand = SQLActivit
SQadapterCLient.SelectCommand = SQLClien
SQadapterMatter.SelectCommand = SQLMatte
' Load Timekeeper Dropdown
SQadapterTime.Fill(dtTime
MainF.DrpTimekeeper().DataSource = dtTim
MainF.DrpTimekeeper().DisplayMember = dtTime.Columns(1).ToStrin
MainF.DrpTimekeeper().ValueMember = dtTime.Columns(0).ToStrin
MainF.DrpTimekeeper().Text = "A TEST
End Functio