Results 1 to 2 of 2
  1. #1
    christing is offline Novice
    Windows 10 Access 2016
    Join Date
    Jul 2019
    Posts
    10

    Need help may i ask how i can track my store status is under send status or return status

    May i ask how i can tracking my store status, it is under status send or return.

    I have create 2 data table,1st is a tbl_checker, tbl_checker is record user insert data. second is tbl_Info, tbl info is record product history. but i am no ideal how i can track my product status is under status send or return. can some one pls teaching me thanks a lot

    Click image for larger version. 

Name:	CHECKER.PNG 
Views:	11 
Size:	13.0 KB 
ID:	39654
    this picture is tbl_Info

    this is the coding i crate for send

    Private Sub btnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click



    Dim cmd As New OleDb.OleDbCommand
    If Not cnn.State = ConnectionState.Open Then
    'open connection if it is not open yet
    cnn.Open()
    End If
    cmd.Connection = cnn
    'check whether add new or update
    If Me.txtCID.Tag & "" = "" Then
    'add new
    'add data to mydatatable
    cmd.CommandText = "INSERT INTO tbl_Info([CBCID],[LineNo],[Date],[Location],[OtherLocation],[PIC],[OtherPIC],[Reason],[Remarks]) " &
    "VALUES('" & dgvData("cbcid", dgvData.CurrentCell.RowIndex).Value & "', '" & Me.txtline.Text & "', '" & Me.DateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:ss") & "', '" & Me.txtLocation.Text & "', '" & Me.txtOlocation.Text & "','" & Me.txtPIC.Text & "','" & Me.txtOtherPIC.Text & "','" & Me.txtReason.Text & "','" & Me.txtRemarks.Text & "')"
    ''"VALUES('" & Me.txtCID.Text & "' , '" & Me.txtline.Text & "', '" & Me.DateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:ss") & "', '" & Me.txtLocation.Text & "', '" & Me.txtOlocation.Text & "','" & Me.txtPIC.Text & "','" & Me.txtotherPIC.Text & "','" & Me.txtReason.Text & "','" & Me.txtRemarks.Text & "')"




    'error message before save data fill textbox
    If txtline.Text.Trim = "" Or txtLocation.Text.Trim = "" Or txtPIC.Text.Trim = "" Then
    MessageBox.Show("Please Insert Data", "Error Message")
    Exit Sub
    End If


    cmd.ExecuteNonQuery()


    MsgBox("Add Data Successful", MsgBoxStyle.OkOnly, "Message")


    Else




    'error message before save data fill textbox
    If txtline.Text.Trim = "" Or txtRemarks.Text.Trim = "" Then
    MessageBox.Show("Please Insert Data", "Error Message")
    Exit Sub
    End If


    cmd.CommandText = "UPDATE tbl_Info " & _
    " SET" & _
    " [LineNo]='" & Me.txtline.Text & "'" & _
    ", [Date]='" & Me.DateTimePicker1.Text & "'" & _
    ", [Location]='" & Me.txtLocation.Text & "'" & _
    ", [OtherLocation]='" & Me.txtOlocation.Text & "'" & _
    ", [PIC]='" & Me.txtPIC.Text & "'" & _
    ", [OtherPIC]='" & Me.txtOtherPIC.Text & "'" & _
    ", [Resason]='" & Me.txtReason.Text & "'" & _
    ", [Remarks]='" & Me.txtRemarks.Text & "'" & _
    " WHERE [cid]=" & Me.txtCID.Tag
    MsgBox("Update Data Successful", MsgBoxStyle.OkOnly, "Message")




    cmd.ExecuteNonQuery()
    End If
    'refresh data in list
    RefreshData1()
    'clear form


    Me.btnClear.PerformClick()
    'close connection
    cnn.Close()
    End Sub

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Since nobody has answered, I'm guessing they're as confused as I am. I don't understand your question, so perhaps you can restate it?

    thats either a language I don't know or a mix of languages. To my eye it looks like VBA and C# mixed together.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 09-10-2018, 01:26 PM
  2. Send Status update via email on a form
    By vad77 in forum Forms
    Replies: 7
    Last Post: 10-17-2017, 07:47 AM
  3. Status bar not working
    By EJC99 in forum Access
    Replies: 11
    Last Post: 01-19-2015, 09:19 PM
  4. Replies: 4
    Last Post: 06-20-2013, 10:26 PM
  5. Status (yes/no)
    By combine21 in forum Access
    Replies: 2
    Last Post: 07-26-2011, 02:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums