Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

u means selected quantityUsed row in datagrid will appear in txtquantityleft on other form?

Jx_Man 987 Nearly a Senior Poster Featured Poster

put this code in top of codes :

Imports System.IO

This following code is function to write and open file :

Public Function GetFileContents(ByVal FullPath As String, _
           Optional ByRef ErrInfo As String = "") As String

        Dim strContents As String
        Dim objReader As StreamReader
        Try

            objReader = New StreamReader(FullPath)
            strContents = objReader.ReadToEnd()
            objReader.Close()
            Return strContents
        Catch Ex As Exception
            ErrInfo = Ex.Message
        End Try
End Function

Public Function SaveTextToFile(ByVal strData As String, _
     ByVal FullPath As String, _
       Optional ByVal ErrInfo As String = "") As Boolean

        Dim Contents As String
        Dim bAns As Boolean = False
        Dim objReader As StreamWriter
        Try


            objReader = New StreamWriter(FullPath)
            objReader.Write(strData)
            objReader.Close()
            bAns = True
        Catch Ex As Exception
            ErrInfo = Ex.Message

        End Try
        Return bAns
End Function

Private Sub btnRead_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRead.Click
    TextBox1.Text = GetFileContents("D:\Jx_Man2.txt")
End Sub

Private Sub btnWrite_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnWrite.Click
    SaveTextToFile(TextBox1.Text, "D:\Jx_Man2.txt")
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

try this code...

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

specify more....

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi..Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi..Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi..Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Daoush...Welcome to Daniweb Friend :)
I from Indonesia too...

Jx_Man 987 Nearly a Senior Poster Featured Poster

I think this thread can be moved to current section. This section just for introduction new member...isn't it?

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

If in LAN system Sqlserver is great to used.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Ex :
Adam, ...,....,.... -> Table A

Bingo, ...,....,.... -> Table B

How if column value like this :
Dabo, ...,....,.... -> Table a or b?

Jx_Man 987 Nearly a Senior Poster Featured Poster

this following code to clear controls, you can add what control you want to clear :

Public Sub ClearControl(ByVal root As Control)
        For Each ctrl As Control In root.Controls
            ClearControl(ctrl)
            If TypeOf ctrl Is TextBox Then
                CType(ctrl, TextBox).Text = String.Empty
            ElseIf TypeOf ctrl Is ComboBox Then
                CType(ctrl, ComboBox).Text = String.Empty
            End If
        Next ctrl
    End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    ClearControl(Me)
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

can you please send sample program with some search criteria,including clearing controls,validating and search criteria remains same when you click revise again in search form

Tratak was given u a codes, use it. however you didn't show how far u done with this? where is your effort? have u read a rules??
We only give homework help to those who show effort

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)
You can post your question and problem in vb 6 section.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...
If this thread already solved Please share your answer with others, so other members can learn from you friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Please share your answer with others, so other members can learn from you friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

use count to know how much rows in column.

select count(*) from tableName
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)
Please post your question on Phyton section...

Jx_Man 987 Nearly a Senior Poster Featured Poster

i think google have many tutorials...

Jx_Man 987 Nearly a Senior Poster Featured Poster

no...showing data in datagrid is not difficult.
this code needed 1 datagrid named dgROP.
This prosedure to show data in datagrid :

Private Sub ShowDataGrid()
        'Dim varConnection As SqlvarConnectionection
        Dim cmdROP As New SqlCommand
        Dim daROP As New SqlDataAdapter
        Dim dsROP As New DataSet
        Dim dtROP As New DataTable

        'varConnection = GetvarConnectionect()
        Try
            cmdROP = varConnection.CreateCommand
            cmdROP.CommandText = "SELECT * FROM tbl_rop"
            daROP.SelectCommand = cmdROP
            daROP.Fill(dsROP, "tbl_rop")
            dgROP.DataSource = dsROP
            dgROP.DataMember = "tbl_rop"
            dgROP.ReadOnly = True
        Catch ex As Exception
            MsgBox("Error: " & ex.Source & ": " & ex.Message, MsgBoxStyle.OKOnly, "varConnectionection Error !!")
        End Try
    End Sub

Call this procedure after you update or delete. the newest data will shown on datagrid.
Private Sub Update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
.....
ShowDataGrid()
End Sub

Jx_Man 987 Nearly a Senior Poster Featured Poster

show us your effort friend....

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome

Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome...
don't forget mark this thread solved :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

MsExcel.Range("A1").Value = "Name"
MsExcel.Range("B1").Value = "Email"
MsExcel.Range("C1").Value = "Mobile"
MsExcel.Range("A2").Value = txtName.Text
MsExcel.Range("B2").Value = txtEmail.Text
MsExcel.Range("C2").Value = txtMobile.Text

Jx_Man 987 Nearly a Senior Poster Featured Poster

Form1.Show vbModal

Vega_Knight commented: easy +1
Jx_Man 987 Nearly a Senior Poster Featured Poster

I don't like to correct anyone but you need to get away from vb6. To do it the net way

TextBox1.Text = TextBox1.Text.Substring(1) & TextBox1.Text.Substring(0, 1)

The first pram is the starting index (0 being the first character). If you omit the second pram then the rest of the string is used. So if the string is "012345" then TextBox1.Text.Substring(1) will return "12345".
The second pram is the length of what you want. In this case the second part Substring(0,1) is getting the first character. It will move the first character to the end of the string.

I'm not good at explaining but I hope you understand what I am trying to say.

If you want something cool, do this to the title bar and look at the task bar. You can do this to show what is happening in your program even it the application is not showing.

Me.Text = Me.Text.Substring(1) & Me.Text.Substring(0, 1)

Thank you for corrected me...
My post is fully vb6 concept. hope to learn much from you :)
Great friend.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Shahdad...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

function to trim all special characters in the text

what you means with "trim all special characters" ?
you want to all special character not allowed to input??

Jx_Man 987 Nearly a Senior Poster Featured Poster

there are many ways :
1. put the exe file on startup folder (manually)
2. Get the Startup folder and copied your exe file to startup folder.
3. Use registry to run your program when windows start.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

you're Welcome :)
don't Forget to mark this thread solved...

Jx_Man 987 Nearly a Senior Poster Featured Poster

i just give a suggest to use datagrid to display data after update or delete.
- how to make a latest data appear after update it using an upadate button?
-> Select the last data and show it.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

you means :
Name (col1) | Email (col2) | Mobile (col3)
Jx_Man email 1234 (row1)
Name1 email1 4321 (row2)

MsExcel.Range("A1").Value = txtName.Text -> first Row in First Column (A)
MsExcel.Range("A2").Value = txtName.Text -> Second row in First Column (A)

Jx_Man 987 Nearly a Senior Poster Featured Poster

display data on datagrid, refresh (called again) after doing update or delete.