can anyone help me?
How to encryption/decryption algorithm for mdb table?
Private Sub cmdSearch_Click()
On Error Resume Next
HighlightText txtSearch, True
If txtSearch.Text = "" Then
Else
Dim con As Connection
Dim rs As Recordset
On Error Resume Next
Set con = CreateObject("adodb.connection")
con.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & App.Path & "/List.mdb;" & "Uid=myUsername;" & "Pwd=1234"
sql11 = "select * from List where PlateNo='" & txtSearch.Text & "' order by month"
Set rs = New Recordset
rs.Open sql11, con, adOpenStatic, adLockReadOnly
If rs.EOF Then
Exit Sub
Else
rs.MoveLast
Text2.Text = rs("bank")
Text3.Text = rs("date")
Text4.Text = rs("description")
Text5.Text = rs("month")
End If
For i = 1 To 5
MSHFlexGrid1.ColWidth(i) = MSHFlexGrid1.Width / 5
Next i
Set MSHFlexGrid1.DataSource = rs
MSHFlexGrid1.Visible = True
End If
' ----------------------------------------------------------------------------
Dim theList As Long
Dim textToSearch As String
Dim theListText As String
Dim salpet As String
If rs.EOF = False Then
textToSearch = LCase(txtSearch.Text & " = " & Text2.Text)
For theList = 0 To lbox.ListCount - 1
theListText = LCase(lbox.List(theList))
If theListText = textToSearch Then
salpet = "exist"
End If
Next
If salpet <> "exist" Then lbox.AddItem txtSearch.Text & " = " & Text2.Text
End If
'-> -----------------------------------------------------------------------------
End Sub
Private Sub Command1_Click()
lbox.Clear
'lbox.AddItem ""
'lbox.AddItem "Results :"
End Sub
Private Sub Command2_Click()
FollowUp.Show
End Sub
Private Sub Form_Load()
'lbox.AddItem ""
'lbox.AddItem "Results :"
End Sub
'"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""'
'Uppercase and Number only
Private Sub txtSearch_KeyPress(KeyAscii As Integer)
If IsNumeric(Chr(KeyAscii)) = False And (Not (KeyAscii > 64 And KeyAscii < 91) And Not (KeyAscii > 96 And KeyAscii < 123)) And KeyAscii <> 8 And KeyAscii <> 32 Then
KeyAscii = 0
Exit Sub
Else: KeyAscii = Asc(UCase(Chr(KeyAscii)))
End If
End Sub
' Highlight Text
Public Sub HighlightText(ctlControl As Control, Optional SetFocus As Boolean)
With ctlControl
.SelStart = 0
.SelLength = Len(.Text)
If SetFocus And .Enabled And .Visible Then
.SetFocus
End If
End With
End Sub
Private Sub txtSearch_GotFocus()
txtSearch.SelStart = 0
txtSearch.SelLength = Len(txtSearch.Text)
End Sub