Private Sub mDBNewEntry_Click() frmEntries.Show 1 End Sub Private Sub mDBSearch_Click() frmSearch.Show 1 End Sub Private Sub MDIForm_Unload(Cancel As Integer) rdsConnection.Close ' We are done, close all connections and reset to 0 Set rdsConnection = Nothing End Sub Private Sub rsRecordSet_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset) If dbWrite = False Then 'If we are not in the add mode, load data in the 'controls. Call LoadData 'This event was fired by opening the recordset in 'step six. End If End Sub Private Sub mOpenDB_Click() Dim strConnect As String Dim strProvider As String Dim strSource As String Dim strDBName As String ' The Database engine link strProvider = "Provider= Microsoft.Jet.OLEDB.3.51;" ' Where the .mdb is located. strSource = App.Path ' Name of Database strDBName = "\rds.mdb;" strSource = "Data Source=" & strSource & strDBName strConnect = strProvider & strSource Set rdsConnection = New ADODB.Connection rdsConnection.CursorLocation = adUseClient rdsConnection.Open strConnect Set rdsRecordSet = New ADODB.Recordset rdsRecordSet.CursorType = adOpenStatic rdsRecordSet.CursorLocation = adUseClient ' Make sure we can save our edited data! rdsRecordSet.LockType = adLockPessimistic rdsRecordSet.Source = "Select * From Info" rdsRecordSet.ActiveConnection = rdsConnection rdsRecordSet.Open End Sub