One more free installer
Other post on this subject: Freeware Installers
Via AccessExtra
News, links, downloads, tips and tricks on Microsoft Access and related
About Me | Search |
Function Max(ByVal d1 As Date, ByVal d2 As Date) As Date
Max = d1
If d2 > d1 Then Max = d2
End Function
Function Min(ByVal d1 As Date, ByVal d2 As Date) As Date
Min = d1
If d2 < d1 Then Min = d2
End Function
Public Function RemoveItem(strRowSource As String, _
lngItemNum As Integer) As String
Dim Pos1 As Long, strResult As String, Pos2 As Long
Dim lngCount As Long, i As Integer
strResult = strRowSource
Pos1 = 1
For i = 0 To lngItemNum
If (Pos1 > 0) And (i = lngItemNum) Then
Pos2 = InStr(Pos1 + 1, strRowSource, ";")
If Pos2 = 0 Then Pos2 = Len(strRowSource)
strResult = Left(strRowSource, Pos1 - 1)
If Len(strResult) > 0 Then _
strResult = strResult & ";"
strResult = strResult & _
Mid(strRowSource, Pos2 + 1)
If Right(strResult, 1) = ";" Then _
strResult = _
Left(strResult, Len(strResult) - 1)
End If
Pos1 = InStr(Pos1 + 1, strRowSource, ";")
Next i
RemoveItem = strResult
End Function
Public Function AddItem(strRowSource As String, _
strItem As String, _
lngItemNum As Integer) As String
Dim Pos1 As Long, strResult As String, Pos2 As Long
Dim lngCount As Long, i As Integer
strResult = strRowSource
Pos1 = 1
For i = 0 To lngItemNum
If (Pos1 > 0) And (i = lngItemNum) Then
strResult = Left(strRowSource, Pos1 - 1)
If Len(strResult) > 0 Then _
strResult = strResult & ";"
strResult = strResult & strItem
If Len(strResult) > 0 Then _
strResult = strResult & ";"
If Pos1 > 1 Then Pos1 = Pos1 + 1
strResult = strResult & _
Mid(strRowSource, Pos1)
If Right(strResult, 1) = ";" Then _
strResult = _
Left(strResult, Len(strResult) - 1)
Exit For
End If
Pos1 = InStr(Pos1 + 1, strRowSource, ";")
If Pos1 > 0 Then
Pos1 = InStr(Pos1 + 1, strRowSource, ";")
If Pos1 = 0 Then Pos1 = Len(strRowSource) + 1
End If
Next i
AddItem = strResult
End Function
Sub ExportToSecuredDB()
Dim strDestinationMDB As String
Dim dbsData As DAO.Database
strDestinationMDB = "C:\Passworded.mdb"
Set dbsData = DBEngine.OpenDatabase(strDestinationMDB, _
False, False, ";pwd=MyPassword")
'Export form
DoCmd.CopyObject strDestinationMDB, "Form1", acForm, "Form1"
'Export table
DoCmd.TransferDatabase acExport, _
"Microsoft Access", _
strDestinationMDB, _
acTable, _
"Table1", _
"Table1"
'Close secured database
dbsData.Close
Set dbsData = Nothing
End Sub
Me.oleExcelObj.Verb = acOLEVerbOpen
Me.oleExcelObj.Action = acOLEActivate