Hi there.
Using VB5
I am a real novice to VB but slowly getting the grasp of thing but at the moment writing things out long hand (thinking there must be short cuts)
Like filling a VB form with MSACCESS data I am detailing every field e.g.
txtCompGST.Text = tldt.Rows(rowpos)("CompGST").ToString()
txtCompName.Text = tldt.Rows(rowpos)("CompName").ToString()
txtCompAdmin.Text = tldt.Rows(rowpos)("CompAdmin").ToString()
txtCompUnit.Text = tldt.Rows(rowpos)("CompUnit").ToString()
txtCompHouse.Text = tldt.Rows(rowpos)("CompHouse").ToString()
txtCompStreet.Text = tldt.Rows(rowpos)("CompStreet").ToString()
txtCompSuburb.Text = tldt.Rows(rowpos)("CompSuburb").ToString()
txtCompCity.Text = tldt.Rows(rowpos)("CompCity").ToString()
txtCompPostCode.Text = tldt.Rows(rowpos)("CompPostCode").ToString()
and for updating e.g.
tldt.Rows(rowpos)("CompGST") = txtCompGST.Text
tldt.Rows(rowpos)("CompName") = txtCompName.Text
tldt.Rows(rowpos)("CompAdmin") = txtCompAdmin.Text
tldt.Rows(rowpos)("CompUnit") = txtCompUnit.Text
tldt.Rows(rowpos)("CompHouse") = txtCompHouse.Text
tldt.Rows(rowpos)("CompStreet") = txtCompStreet.Text
tldt.Rows(rowpos)("CompSuburb") = txtCompSuburb.Text
tldt.Rows(rowpos)("CompCity") = txtCompCity.Text
tldt.Rows(rowpos)("CompPostCode") = txtCompPostCode.Text
tldt.Rows(rowpos)("CompPhone") = txtCompPhone.Text
and new information e.g.
Dim drNewRow As DataRow = tldt.NewRow()
drNewRow("CompGST") = txtCompGST.Text
drNewRow("CompName") = txtCompName.Text
drNewRow("CompAdmin") = txtCompAdmin.Text
drNewRow("CompUnit") = txtCompUnit.Text
drNewRow("CompHouse") = txtCompHouse.Text
drNewRow("CompStreet") = txtCompStreet.Text
drNewRow("CompSuburb") = txtCompSuburb.Text
drNewRow("CompCity") = txtCompCity.Text
drNewRow("CompPostCode") = txtCompPostCode.Text
I can see this is going to be very time comsuming for all the forms I will need to create. I have searched manuels and web for specifics but am getting a little lost.
Can someone please point me in the right direction to simplify this task
Many thanks
Craig