title: Making Monthly Transaction
body: <p>I need help on how to make this code below be executed on a monthly basis in Visual Basic 2010 using Ms Access. I tried to set a monthly date but I  could only set for a specific month. I want it to be like a banking system where its executed every monthend.</p>
  
  <pre><code>Public Sub Withdraw
  
      If myConnection.State = ConnectionState.Closed Then
          myConnection.Open()
      End If
  
      str = "insert into [Transactions] ([TransactionID],[EmployeeID], [AccountNumber], [TransDate], [Description], [Debit], [Balance], [Time]) values (?, ?, ?, ?, ?, ?, ?, ?)"
      Dim cmd As OleDbCommand = New OleDbCommand(str, myConnection)
  
      cmd.Parameters.Add(New OleDbParameter("TransactionID", CType(TNumber, String)))
      cmd.Parameters.Add(New OleDbParameter("EmployeeID", CType(OveralEmployeeID, String)))
      cmd.Parameters.Add(New OleDbParameter("AccountNumber", CType(AccountNumberTextBox.Text, String)))
      cmd.Parameters.Add(New OleDbParameter("TransDate", CType(CurrentDate, String)))
      cmd.Parameters.Add(New OleDbParameter("Description", CType("Withdraw     WD - " + TNumber, String)))
      cmd.Parameters.Add(New OleDbParameter("Debit", CType(WithdrawAmountTextBox.Text, String)))
      cmd.Parameters.Add(New OleDbParameter("Balance", CType(GetBalance(), String)))
      cmd.Parameters.Add(New OleDbParameter("Time", CType(CurrentTime, String)))
            Try
          cmd.ExecuteNonQuery()
          cmd.Dispose()
          myConnection.Close()
          ClearGroupBox()
          AccountNumberTextBox.Text = Nothing
          MsgBox("Withdraw Reorded")
      Catch ex As Exception
          MsgBox(ex.Message)
      End Try
  End Sub
  </code></pre>