What's new

Closed MS Access, VB2010

Status
Not open for further replies.

d312ick

Addict
Joined
Nov 4, 2015
Posts
11
Reaction
0
Points
67
Age
32
guys. pwede bang iload ang database table from textbox? yung input ko sa text box table name tapos tawagin sya via submit button? dami ko ksing tables. so pag mag aadd ako ng items(eg. delivery date,QTY,po number) hindi nko gagawa ng form for every item.
 
hehe. sorry po. eto.

may tatlo akong database para sa mga MATERIALS. sa materials section dto s company. ngaun. all in all may 500+ akong tables. ngaun. per table may 10 fields. ItemCode, ItemDescription, DeliveryDate,PONumber and so on. ngaun, per item mag lalagay ako ng delivery monitoring. so another form yun. ang table ko po ksi is per item. so pag mag aadd nko ng delivery. panu ko maloload yung gusto kong tawaging table through textbox and command button. kasi kung diko sya gagawing ganun gagawa ako ng 3000+ na forms sa project ko. so iniiwasan kong gumawa ng ganun kasami ksi bka bumagal project ko pag dineploy na.
 
bro gamit ka ng combo box.. eto sample

Set Rscompany = New Recordset
Rscompany.Open "SELECT * FROM company "

Do While Not Rscompany.EOF
Combo1.AddItem Trim(Rscompany!company)
Rscompany.MoveNext
Loop
 
bro gamit ka ng combo box.. eto sample

Set Rscompany = New Recordset
Rscompany.Open "SELECT * FROM company "

Do While Not Rscompany.EOF
Combo1.AddItem Trim(Rscompany!company)
Rscompany.MoveNext
Loop


Pwede bro pki elaborate skin ng onti yung code ksi parang di ko magets. hehe. sensya na. beginner plang ako as developer. and access gamit kong db. OleDb connection ko.
 
lahat pedeng magawa sa VB... depende yan kung paano mo gagawin .. at sa coding naman maraming klase yan, iba-iba kase ang logic ...
 
guys. naload ko na sa combobox yung table names,. salamat sa inyo. ngaun, problem ko naman is kung panu ko gagawin yung pag clinick ko yung Table Name sa combobox yung table na yun yung iloload.. may idea b kau kung pnu yung gawin. kahit idea lang mga brad. thanks,, eto code ko sa pag fetch na table names sa combobox.

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click

Dim myConnection As New OleDb.OleDbConnection
Dim strConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\IT-PC\Documents\Visual Studio 2010\Projects\MaterialsSectionISV2\Metal.accdb"
myConnection.ConnectionString = strConnectionString
myConnection.Open()
Dim schemaTable As DataTable = myConnection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})

For Each dr As DataRow In schemaTable.Rows
Combo1.Items.Add(dr.Item("TABLE_NAME"))
Next

End Sub
 
Dear d312ick,

Since 2 years have passed since the last reply in this thread, I am locking it to prevent necroposting. Feel free to start a new thread or contact any forum staff if you want this to be reopened.

Thread closed.
 
Status
Not open for further replies.

Similar threads

Back
Top