I am trying to connect to mysql database a different way than usual and getting an argument not optional error on the highlighted.

FORM
VB Code:
  1. Private Sub cmdAdd_Click()
  2.     Dim LvwItm As ListItem
  3.    
  4.     With Me
  5.         Set LvwItm = frmLedger.lvwAccountLedger.ListItems.Add(, , Format(Date, "mm/dd/yyyy"))
  6.         LvwItm.SubItems(1) = .txtTransactionDescription.Text
  7.         LvwItm.SubItems(2) = Format(.txtCredit.Text, "0.00")
  8.         LvwItm.SubItems(3) = Format(.txtDebit.Text, "0.00")
  9.     End With
  10.    
  11.     [hl]DatabaseConnection[/hl]
  12.    
  13.     strSQL = "SELECT * "
  14.     strSQL = strSQL & "FROM Ledger"
  15.     objCon.Execute strSQL
  16.    
  17.     OpenRecordset
  18.    
  19.     With frmLedger
  20.         strSQL = "INSERT INTO Ledger ("
  21.         strSQL = strSQL & "AccountNumber, "
  22.         strSQL = strSQL & "TransDesc, "
  23.         strSQL = strSQL & "Credit, "
  24.         strSQL = strSQL & "Debit, "
  25.         strSQL = strSQL & "EntryDate) "
  26.         strSQL = strSQL & "VALUES ("
  27.         strSQL = strSQL & "'" & .cboAccountNumber.Text & "', "
  28.         strSQL = strSQL & "'" & .txtTransactionDescription.Text & "', "
  29.         strSQL = strSQL & "'" & Format(.txtCredit.Text, "0.00") & "', "
  30.         strSQL = strSQL & "'" & Format(.txtDebit.Text, "0.00") & "', "
  31.         strSQL = strSQL & "'" & Now() & "')"
  32.     End With
  33.    
  34.     objCon.Execute strSQL
  35.    
  36.     Unload Me
  37. End Sub

MODULE
VB Code:
  1. Option Explicit
  2.  
  3. Public Sub DatabaseConnection(objCon As ADODB.Connection)
  4.     Set objCon = New ADODB.Connection
  5.    
  6.     With objCon
  7.         .CursorLocation = adUseClient
  8.         .ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
  9.                           & "SERVER=IP_ADDRESS;" _
  10.                           & "DATABASE=DATABASE_NAME;" _
  11.                           & "UID=USERNAME;" _
  12.                           & "PWD=PASSWORD;" _
  13.                           & "OPTIONS=3;"
  14.     End With
  15. End Sub
  16.  
  17. Public Sub OpenRecordset(objCon As ADODB.Connection, _
  18.                          objRs As ADODB.Recordset, _
  19.                          strSQL As String)
  20.    
  21.     Set objCon = New ADODB.Connection
  22.     Set objRs = New ADODB.Recordset
  23.    
  24.     objCon.Open strSQL, objCon, adOpenStatic, adLockReadOnly
  25. End Sub
  26.                          
  27. Public Sub CloseRecordset(objRs As ADODB.Recordset)
  28.     objRs.Close
  29.     Set objRs = Nothing
  30. End Sub
  31.  
  32. Public Sub CloseConnection(objCon As ADODB.Connection)
  33.     objCon.Close
  34.     Set objCon = Nothing
  35. End Sub