News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Name:Alex Dybenko

Location:Moscow, Russia

Monday, October 29, 2007

CompareEM - Database Change Propagation for Microsoft Access

CompareEM is a very simple to use utility to analyze a pair of related Microsoft Access databases, determine what has changed from one to the other, and then generate VBA code that will transform one into the other. FREE!

Friday, October 26, 2007

How to print several copies of report

There is no option to specify number of copies when you run DoCmd.OpenReport. But still there is a way to do so:

DoCmd.SelectObject acReport, "MyReport", True
DoCmd.PrintOut acPrintAll, , , , intCopies

Where intCopies specifies the number of copies. Using DoCmd.PrintOut you also get access to other options of Access Print Dialog – Print range, pages from-to, etc.

Friday, October 19, 2007

Record-level locking cause database growth

There was an interesting discussion  in modulesdaovba newsgroup: Albert D. Kallal, Access MVP, had a very good explanation why mdb file grows so much during import - "Open databases using record-level locking" option on Options dialog Advanced tab. Read the whole thread 1GB bloat while importing


Monday, October 15, 2007

Using HTTPXML to get data from the Web

This sample code shows how to use XMLHTTP library to send a request and then get a response  from web server. This code actually getting currency exchange rate from Central bank of Russia

Public Function GetRateCBR(dDate As Date, strCurCode As String) As String
Dim sUrlRequest, intTry As Integer, strResponse As String
Dim oResponse As Object 'MSXML2.XMLHTTP
'Sample usage:
' GetRateCBR(#10/12/2007#,"USD")
' GetRateCBR(#10/12/2007#,"Eur")
On Error GoTo GetRateCBR_Error

Set oResponse = CreateObject("MSXML2.DOMDocument")
'Send request
sUrlRequest = "" _
& Format(dDate, "") _
& "&date_req2=" & Format(dDate, "") _
& "&VAL_NM_RQ=" & "R0123" & IIf(strCurCode = "EUR", 9, 5)
' get response
intTry = 1
Do Until intTry > 10
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
oXMLHTTP.Open "GET", sUrlRequest, False
If oXMLHTTP.Status = 200 Then
If oResponse.loadXML(oXMLHTTP.responseText) Then Exit Do
End If
If Not oXMLHTTP Is Nothing Then _
oXMLHTTP.abort: Set oXMLHTTP = Nothing
intTry = intTry + 1
If Not oXMLHTTP Is Nothing Then _
oXMLHTTP.abort: Set oXMLHTTP = Nothing
If intTry <= 10 Then
strResponse = Mid$(oResponse.Text, 3)
GetRateCBR = strResponse
End If
If Not oResponse Is Nothing Then _
oResponse.abort: Set oResponse = Nothing
On Error Resume Next
Exit Function

Select Case Err.Number
Case Else
MsgBox "No internet connection!" & vbCrLf & "Error " & Err.Number & " (" & Err.Description & ") in procedure GetRateCBR of Module alxmdlCurrencyRate"
Resume GetRateCBR_End
End Select

End Function


Technorati tags: , ,

Wednesday, October 10, 2007

Access 2003 to Access 2007 command reference guide

Very cool staff - Access 2003 to Access 2007 command reference guide, interactive video! Should be a part of Access 2007 installation, looks like lot of people get lost like myself.

Technorati tags: ,

Wednesday, October 03, 2007

DLL/COM Redirection on Windows

Tony Toews, Access MVP, has recently pointed me to DLL/COM Redirection on Windows MSDN article, the technique I was not aware of. Have not yet tried this with Access, but I heard from my friend that it works for VB6. So, if you have this technique working with Access – please let me know.


Technorati tags: ,

Tuesday, October 02, 2007

MVP 2008

Today I got MVP award again! I feel great!

BTW, Access rocks!

Technorati tags: