Microsoft Access





Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have a multi-user Access application (including users in India) and users have a bad habit of walking away from their computers and staying logged in. This makes periodic compact and repair of the back end impossible.

Is there a way to force an Access application to quit after a certain amount of time without activity?
Ransomware: The New Cyber Threat & How to Stop It
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

I install MS Access 2010 runtime  expecting to find runaccess.exe - but it's not there. How do I install runaccess.exe?

I have an old application with  a complex command line to call an Access file using runaccess.exe.
we are using zimbra mail accounts in our organization,which ports are released to public network in zimbra,our clients communicate with out side and internally ,so with securely what ports are released in public access
Click download, a white box appears with and X and nothing else.. Attempted with Chrome & IE
Word 2016/Win10:


In a manuscript, I have the word "fiance" where the "e" has an accent over it.

When I search on "fiance", it's not found. Doubtless b/c of the accent. Is there a workaround?

I have an ODBC connection to a Cache data to append to a table in Microsoft Access and that is working just fine. But what I would also like to do is to take that same recordset and display it in Access like an Access query using VBA. I found some examples using qrydefs but I can't seem to get it to work with an ADO connection. Is there another way of doing this using ADO?

Below is an example of my connection string that pulls the recordset I need. Any suggestions would be greatly appreciated.

Thank you in advance,


Public Sub RunLVPendingQuery()
On Error GoTo PROC_ERR
Dim cnn As ADODB.Connection
Dim rst As ADODB.Recordset
Dim strVar As String

    Set cnn = New ADODB.Connection
    Set rst = New ADODB.Recordset
  DoCmd.Hourglass False

  cnn.ConnectionString = SQCon
strVar = "SELECT DISTINCT SITE.U_DPL_View.AN, SITE.U_DPL_View.PtNumber, " & _
             "SITE.U_DPL_View.PtName, SITE.U_DPL_View.CollectDateODBC, " & _
             "SITE.U_DPL_View.CollectTimeODBC, SITE.U_DPL_View.PriorityCodes, " & _
             "SITE.U_DPL_View.BatTstCode, SITE.U_DPL_View.HID, SITE.U_DPL_View." & _
             "ReceiveDateODBC, SITE.U_DPL_View.ReceiveTimeODBC, SITE.U_DPL_View." & _
             "WorkSheetID, SITE.U_DPL_View.WkshtCode, SITE.U_DPL_View." & _
             "DeleteEvent, SITE.U_DPL_View.PtLoc, SITE.U_DPL_View.TestCode, " & _
             "SITE.U_DPL_View.CID_1, SITE.U_DPL_View.CID_2 " & _
I have codes below and everything works fine except I get alert message below

The process cannot access the file 'c:\abc.xml because it is being used by another process

Just FYI, the xml is used for a website with around 20 users.

   public static DataTable GetUniquePhoneNo(string accountPhoneNo)
            string clientPhoneNo = string.Empty;
            string inputFilePath = filePathUserMessagesAll;
            DataTable dt = new DataTable();
            dt.Columns.AddRange(new DataColumn[]
                new DataColumn("PhoneNo",typeof(string)),
                new DataColumn("Client",typeof(string)),
                new DataColumn("DateCreated",typeof(string))
            XDocument xdoc = null;
            using (XmlReader xr = XmlReader.Create(inputFilePath))
                xdoc = XDocument.Load(xr);
                var query1 = from t in xdoc.Descendants("User")
                             where t.Element("From").Value.ToLower() == "+1" + accountPhoneNo.ToLower()
                             select new
                                 To = t.Element("To").Value,
                                 FullName = t.Element("FullName").Value,
                                 DateTimeSent = t.Element("DateTimeSent").Value

Open in new window

I have an Excel file that looks like the following.  I know how to use the query wizard to find dupe Company Names and how to use the query wizard to find Dupe First Names.  But how do I create a query to find records that have no dupes?  In this case, just one record.

Dupes Example

I keep getting a related record error when I enter information into a subform of a subform. I have linked the tables and they are related by a one to many relationship, but Parent Table isn't populating the child table with a key and when I enter info into the child table I am told there isn't a related record. There should be.

I am stumped at this point.

The Tables are links as

Table 1

1 to Many

Table 2

1 to Many

Table 3

1 to Many

Table 4 (This is where I am getting the related record error when I enter information).

any ideas?
Using Access 2013. and I.E. 11 . This does not happen when copying from Chrome, but company policy is we need to use I.E. 11
There was a recent change company wide to add a line break on email addresses using the following code on internal web pages.

function formatEmailForWrapping(string) {
      var newString = string;
      newstring = newstring.replace(/[@]/, "@<wbr />")
      newstring = newstring.replace(/[_]/g, "_<wbr />")
      return newString;

It is not an option to change back to the old format therefore we must fix this in Access. We need to find a way to clean the email address. it's being pasted in the form it looks fine. But when it's saved and displayed it has "? next to the "_" and the "@" along with other garbage with seems invisible. I tried a VBA replace of the "?" but that did not work.

Does anyone know the correct code to look for to clean out the line break? Or has anyone had this issue before and have a fix.

If the address being copied is it is saved as  my_?name_?here@?

Thanks in advance
Free Tool: IP Lookup
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Hello, I am attempting to add vba to a command button to look at a text box and if not null, then look at a combo box. If that combo box is null, have a pop up message box and not allow the user to save the record. Since it is a continuous form and there are several records showing, it works fine on the first record, however it does not for the following records. I believe this is because I need to loop through each record. Below is the VBA I have so far. I would greatly appreciate any help regarding the loop, as I am new to VBA.

If Not IsNull(Me.Text33.Value) Then
   If IsNull(Me.Combo24.Value) Then
MsgBox "You must state if the rationale is aligned with procedures for each disputed subcategory."

'do nothing
End If
End If

Thank  you in advance,

I want to click an image box on a form, find the image file and embed it into the underlying table all in one process. Is that possible?
I have a simple database that contains a couple of tables, queries. macros and modules etc.. I'm trying to make it more users friendly, so I have designed a form that loads up and will give the user the option to select an option button then the macro will run and create the report. However what I want the form  to do is to remember the last option button that was selected when the form re-opens.


I am Rupesh & I am new to this forum.

I am trying to build a tool in excel which can update database maintained in access.

There will be 3 to 4 user for this excel tool which will be connected to one access database.

The excel will act as the front end tool & access as a backend tool.

I want excel VBA to perform 3 things:

1. It will update data in access based on 2 column which will act as a unique code.
2. It will add any new row if the data doesnt match with previous unique code.
3. If the user wants to delete perticular row / range then it will be deleted from database also.

Below sample of table:

Country      Product code      Sub-Brand      Mfg Base
Russia      SRU030008869020137      Syrups      Own
Russia      SRU030008869020141      Syrups      Own
Russia      SRU030008564220158      Tablets      Own
Russia      SRU030008564220258      Tablets      Own
Russia      SRU030008564220558      Tablets      Own
USA      SRU030008869020137      Syrups      Own
USA      SRU030008869020141      Syrups      Own
USA      SRU030008564220158      Tablets      Own
USA      SRU030008564220258      Tablets      Own
USA      SRU030008564220558      Tablets      Own

1st two column will act as a unique key.

We cannot use a replacement code since there will be multiple user working on different region, replacement option can change  or erase others database.

Thanks for the help in advance.


   How to create a macro for exporting the excel data into access database. Can anyone please help me.
Hi. I am running the following event procedure which worked in another part of my database but is now returning a value of "-1" to my field in this case "ProjectTitle" which is a text field. My code is below:

Private Sub ProjectTitle_AfterUpdate()

    Me!ProjectTitle = True
    DoCmd.RunCommand acCmdSaveRecord
    Dim strProjectTitle As String
    strProjectTitle = Me.ProjectTitle
    With Me.RecordsetClone
        .FindFirst "ProjectTitle = " & Chr(34) & strProjectTitle & Chr(34)
        Me.Bookmark = .Bookmark
    End With

End Sub

Open in new window

Anybody know why?
I have a continuous form 'Address_Pre' in my Access 2013 application.

Each line lists a subset of all of the address information for a client. (ClientName, Contact Name, address line 1, office phone, email address)

All of the text boxes are locked on form 'Address_Pre'.  

There is an 'Edit' button to the far left of each line o form 'Address_Pre'.  When this 'Edit' button is pressed the user is presented with an editable screen ('Address_Full)' containing all of the address information for the client.  Changes to any of the address fields can be made on this screen.

When the user saves the revisions on the 'Adddress_Full' it closes and they are taken back to the continuous form 'Address_Pre'.  When I come back to 'Address_Pre' I do a requery to show any information that may have been changed.

This works and the updated information is reflected on 'Address_Pre'.

The problem is that when I do the requery upon returning to 'Address_Pre', the top line of the form becomes the current line.  If the user is working there way down thru all the addresses on the form they have to arrow down to the next address they want to work on.

What I would like to have happen is:

The user presses the 'Edit' button on the twelfth (or whatever) line down from the top of the form.  They make changes and come back to 'Address_Pre'.  I want there changes to be reflected on 'Address_Pre' but I also want the twelfth (or whatever) line they were working on to be the current record …
An oldie, but a goodie.

I have created a large Relationship Diagram in Access 2013 and I do have a Cannon iPF8400 Plotter. I have set the page size to 18 x 24 C, which shows the relationship on one page; however the report will not print, as the plotter errors out. If I go into Report Design View the paper size has been truncated to 12.5 x 19.5 and the Diagram Window has been adjusted to fit to that size.

I have read this thread, Lebans and Allen Brown are no longer available.

So what are my options?
A client changed his SQL server 2008 R2 SA Password. He doesn't remember what the old password was. Now his Access application doesn't work.

We have a good backup. Is there a set of files/ folder we can restore from backup to get the old PW back? I'd really not go through the pain of doing a complete system restore.

Technology Partners: We Want Your Opinion!
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

I cannot close each pdf file separately
I am currently using the following code to pull data directly from Outlook into access:

FROM Inbox IN 'C:\Temp'[Exchange 4.0;|];

Open in new window

Instead of getting the email from my personal Inbox, however, I want this code to reference a team email box that is shared by colleagues so we can all use this tool.

The name of the account is different than just my email address so I think the syntax is more difficult to figure out:


I tried to do different variations like this and I keep getting errors:

FROM Inbox IN 'C:\Temp'[Exchange 4.0;MAPILEVEL='PGHCC Support [JRDUS]'|];

Open in new window

I know it is probably the brackets that are causing the issue... how can I make sure access knows the brackets are part of the inbox name?

Thanks for your help.

 I want to upload my excel data file to access using button event. Below is my code.

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click

        Dim Conn As OleDbConnection

        Dim Cmd As OleDbCommand

        Dim Filename As String = "D:\Ayyappan\claimDump.xlsx"



        Dim StrFileName As String = String.Empty

        Dim XLA As New OleDbDataAdapter

        Dim XLTable As New DataTable

        Dim StrSelect = "SELECT * FROM [{0}]"


        OpenFileDialog1.FileName = ""

        OpenFileDialog1.Filter = "Excel |*.xlsx|All files (*.*)|*.*"

        If OpenFileDialog1.ShowDialog() <> Windows.Forms.DialogResult.OK Then

            Exit Sub

        End If

        StrFileName = OpenFileDialog1.FileName

        Conn = DBConn()


        Cmd = New OleDbCommand("INSERT INTO claimDump([a],[b],[c],[d],[e],[f])  SELECT * INTO [Excel 12.0 xml;DATABASE=" & StrFileName & ";Extended Properties=Excel 8.0;]", Conn)


        ' Catch ex As Exception

        ' MsgBox("Some error")


        'End Try


    End Sub

While running the code I got "IErrorInfo.GetDescription failed with E_FAIL(0x80004005" this error.

Am checking my excel sheet the header name is same as per the insert statement like a,b ,c etc..

Can anyone help me on that.
I am really tired of asking users not to open file directly from the share drive as it stop updating the data from multiple sources. Is there a way I can track those users?
I'm trying to work out what parts of a project that I need to tackle are feasible using MS Access. Although this question has many parts, I am really after yes/no answers and perhaps some general clarifying comments about whether it's feasible. If it turns out feasible then I will ask new, specific questions on those parts I don't know how to do.

I have a table containing details of jobs that need to be done in a geographic area and the list includes GPS coordinates. The plan is to:
1. Display the list of jobs on a MS Access form alongside a map showing ALL the  points, not just the selected one (to get a visual overview). Since I don't think I can create a single hyperlink that would display all the points I thought the easiest way would be to use a function to create a kml file and then launch that KML file in a browser control with Google Earth on the MS Access form.
     I know how to create the KML file but is it possible to display the resulting Google Earth display in a browser control on the form?

2. I would like the user to be able to select a job, assign it to a team and have Google Earth reflect the assignment by perhaps changing the color of the pin. The only way I can think of would be to re-create and re-launch the KML file after every update.
    Is that a feasible approach, or is the refresh likely to be too slow?
    Is there a better way?
    Is there a way to have Google Earth highlight the pin that corresponds to the record selected in the …
Hello ALL,

Is there a way to send a PDF file to the printer without opening the PDF to print it?
Thanks in advance

Microsoft Access





Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.