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 current Access DB saved an *.accdb.  I am trying to convert this DB to the *.mdb format.  However the current Access DB has embedded macros within it.  How can I disable these macros so that I can convert this Access DB into the older MDB format??


Patrick Q

An 8(a)ccessible Native Hawaiian Owned Company
I have a form with a sub-form.  If a checkbox on the main form is false then I want a text box on the sub-form to NOT be enabled.

I am trying this but get an error...  "Application-defined or object-defined error"

The main form is frmQuoteOrderDetail
The sub-form is subfrmOrderDetailsSizes
The checkbox on the main form is chkbxYSqty
The textbox on the sub-form is txtYSqty

My code so far:

    If Forms!frmQuoteOrderDetail.Form!subfrmOrderDetailsSizes.Form.chkbxYSqty = False Then
        Me.txtYSqty.Enabled = False
    End If

Open in new window

I need to append a table with tasks completed for customers on a daily basis, excluding duplicate entries.
It is acceptable if different tasks are completed for the same customer, so the customer can repeat.  And the same task can be completed for different customers.
But the same task for the same customer cannot count twice.
Let’s call the source table for my query “tbl_Alltasks” and the destination table that I am appending is “tbl_October”

To explain; The tasks are cashiering related and have names like “1st payment received”.
Let’s say I have a customer named Joe Blow. Joe wrote a check for his first installment yesterday.  The transaction would reflect on the source table “tbl_Alltasks” with task “1st Payment received” completed as entered by the cashier.  There is another field “Date completed” that would show it was done yesterday.
Hypothetically, I would run my query to add records from the day before and it would get added to “tbl_october”.
My source table may show that Joe made his first payment twice if he bounces a check and then replaces it.  But “1st Payment received” cannot recur in my destination table.

Tbl_Alltasks has fields for ‘Customer’, ‘Task’, ‘ Date completed’ appending
Tbl_October which has ‘Cust’, ‘Tsk’, ‘Date’.
Tble October also has a text field ‘Desc’ that I can use for anything, e.g.   cstring([customer] & [task]
Hello All.  This might get more complicated than I originally hoped.

 I am using data from a MS Access Table to populate a MS Word Table.
     acro_spacer and  acronym

One of two  "Custom Styles"  must be added to each row of the MS Word Table when the data is added.
i was hoping that someone could provide with the correct syntax?

     If strtxtStatusAAW = "Add" Then
        objDoc.TrackRevisions = True
        strTrackRevisions = True
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 1).Range.Text = strttxtTermAAW
        tblAppA.Cell(intrsttblAppendixAWorkingRowCounter, 2).Range.Text = strttxtDefinitionAAW
      tblAppA.Rows(intrsttblAppendixAWorkingRowCounter).Selection.Range.Style = "acro_spacer"   BTW. Did not work.

    End If

Please hang in there with me.
This is where the possible problems start.  When I create a new document and Add the Table using VBA, The Custom Styles are not in the Styles Choice List.
They are in the list of previous documents that have used the custom styles.  See Photo Attached.

Next Questions:
Can I use VBA to Add them to the Styles List just by saying Add Style acro_spacer or acronym and then use them?
         objDoc.HeadingStyles.Add Style:="acro_spacer", Level:=2    BTW. Did not work.

Do I have to create them from scratch and then add them to the Styles List using VBA  before I …
I am writing software that displays 1 to 5 stars on a form, and need to be able to programmatically refer to a picture object.. I can't figure out the syntax.

The number of stars is in an MS Access table that displays on the form.
The following code is in the on open event, but does not work

nn = Me.Stars

For pp = 1 To nn
   Forms("frmDetailListingPassives")("StarPix" & Trim(nn)).Picture = "C:\Disti-Master\Database\Star.jpg"
Next pp

Can anyone help?
Hi Experts,
Wondering if there is a way to link an Access 2003 application to an Excel XLSX file?
if not, can someone post code to convert file from XLSX to XLS?

I am looking for an access vba script, to delete excel files in a folder which are older than 7 working days.

greatly appreciated your help on this

Thank you
2683 There is no object in this control error

I have client who has management system built in ms access 2000 and it gave me above error  

It's ask me to debug when i debug it points me to

when step in it gives exception and it stuck with date "01/01/2001". I tried to registered


The application shourcut is on desktop and the database and file is located in C:\Studio\

Once I register the mscomct2.ocx it gives another error
and locates me to the above place

Attached is the file. Please help

Fahad Hameed

I am in search for a Access vba code, which delete the contents in a excel worksheet, and migrate a access query data set into it. This method helps me to keep excel formulas on other sheet without loosing its reference. Else I get #REF on formulas, if i delete the data set sheet

Looking forward for your suggestions..

I am getting the following error while trying to import a csv file into Access 2016
followed by
"an error occurred trying to import file (filename) the file was not imported"
Any help appreciated
I have a form with a Command Button which I want to open a popup form, add a new record ID, and let me fill in the rest of the record.  

If I create the button directly on the popup form to create a new record, it works.  But when I try to put the button on a main form that will open the popup form and then create a new record, it will open the popup but I get an error that it can't go to the specified record with the debugger showing the error at 'DoCmd.GoToRecord,, acNewRec line'.  Any suggestions?

Private Sub NewCustShipAddIDBtn_Click()
   Dim NewCustShipAddID As Long
   NewCustShipAddID = DMax("[CustShipAddID]", "CustShipAddress") + 1
   DoCmd.OpenForm "CustShipAddress"
   Me.AllowAdditions = True
   DoCmd.GoToRecord , , acNewRec
   CustShipAddID = NewCustShipAddID

Open in new window

Thanks in advance.
Within Access 2003, I am looking for a way to export C-Chart files to a folder that can be shared to specific user accounts on an Active
 Directory network?  We would like to set permissions to Read-Only for those specific user accounts.  Again I am using Access 2003.
We have a Microsoft Access application, running on Server 2012 R2 that is accessed via RDP.  On forms with tabs (the graphical kind), it appears that the CPU usage seems to spike/rise considerably when the mouse is moved within a tab.  If I move the mouse onto a form without a tab - it seems to rise a little, but nothing to worry about.
Hello Experts,

Please review the example data attached.

The first table is called RawPunchRpt_Tbl and it contains a timecard for an employee. The second table is called AgentStateDetailRpt and it contains all the activities that the employee participated in tracked by a separate system. I want to find the closest start timestamp and state to the timestamp in the RawPunchRptTbl.

So here is the SQL code I tried in MS Access which I limited to just the shift start and the log in's:
SELECT userid, [punch type], [punch timestamp], [shiftseqid], [start], [end], [state], [reason]
FROM (SELECT * FROM RawPunchRpt_Tbl WHERE shiftseqid = "1") AS A LEFT JOIN (SELECT * FROM AgentStateDetailRpt WHERE State = "LOG IN") AS B ON (A.userid = B.resourceloginid) AND (A.[punch timestamp] <= B.start AND A.[punch timestamp] < B.end)

Open in new window

It sort of works but since there are two LOG IN states in the AgentStateDetailRpt table the code returns both of the timestamps instead of the closest timestamp.

Is there a way I can get the code to just return the start timestamp closest to the raw punch timestamp?

Thank you in advance for any assistance you can provide.
We are using MS Access frontend forms and a SQL backend for a Quality Control database.  It's multi-user and we have one PC, a laptop, that is getting the "This record has been changed by another user since you started editing it" error.  It's MS Office Plus Access 2013 and MS SQL Server Enterprise 2016 SP2 (13.0.5026.0).

      * Only on PC is having this problem
      * It's not the same record every time
      * The Access DB is on a shared server not on the local laptop
      * All the users, including the one in question has access to Read/Modify/Write on that server share.  
      * It's an update record that's having the problem, we haven't tested an insert
      * We split our time between working in the office and working from home through VPN
      * The user is getting the error at both home and at work.  Doesn't matter where they are.

What we have tried
      * We have had the user try it on a different PC, and they didn't have any issues at all
      * We have the BIT fields set to 0 instead of Null
      * We have the Timestamp Field

What we haven't tried yet
      * We have not tried the me.dirty = False before updating the record.  Any validity in trying this for just one laptop?
      * Had another user login to the problem PC and see if they get the error.  Just thought of that as I was typing.  Will test that out.  

      * Why only one PC?  Shouldn't all of the other PCs have the same intermittent issue?
I am looking for a working 64bit Font dialog for Excel.
Is there a way to retain the color scheme of a pivot chart when filtering it?  I have reset the color scheme for a bar chart only to have it revert back to its original colors after filtering it.
How can I retain the colors in the pivot chart after filtering it?
Is there a way to filter a pivot table and at the same time update a pivot chart with the same filters?
I am importing an XML file generated by a third party application into Microsoft Access, the process works but each of the tables it creates does not import with a unique reference for me to tie everything together, so now I'm left without a way to query the data.

Each XML import is the result of a 'company lookup' which brings in data relating to businesses (directors, names, company details, balance sheet etc.). I will be importing lots of different company data into the same tables, so I need an identifier which will be in each table which identifies which company the data is for - i.e. company registration number. The company registration data is held within each XML import.


I have attached an example XML file (don't worry this is all publically accessible information so there's nothing confidential), I have also attached how this imports into Access.

Can someone help me here to explain how I can get a unique identifier (preferably the company registration number) into all of the tables so that I may link it all together?

Many thanks in advance!

Access Screenshot
Hello Experts,

I wish to make a query like the attached image. I want to Sum the [Total] field for each record in the parent table "tblEOPs". I think this can be achieved with nested SELECT's. I just don't know how. Txs in advance.

I have an issue with a chart not updating.
The structure is:
A main form (frmMain)
A subform in the main form (subfrmAge) - It contains a crosstab query (XAge)
A chart in a subform (subChartAge) - The record source is (XAge)

The problem is that when I filter XAge with a button on my main form, the values from subChartAge is updated, however the chart isn't.

I've tried adding

Open in new window

However, the chart is not updating with the query. Why is this happening?
I had this question after viewing MS Access copy and rename file.

I have inherited an Access database that has needed a bit of updating. I have created code to capture a file path and name in a single field.  Now I need to use that information to copy the file to a different directory and rename it with a somewhat complicated naming convention that is already in the code. The original code was designed to capture a WIA scanned document and then convert it to PDF before saving it. Here is some of my code that currently fills a text box.     Set fd = Application.FileDialog(msoFileDialogFilePicker)
    With fd
        .ButtonName = "Select"
        .AllowMultiSelect = False
        .Filters.Add "PDF Files", "*.pdf", 1
        .Title = "Choose PDF File"
        .InitialView = msoFileDialogViewDetails
        For Each oFD In .SelectedItems
            fileName = oFD
        Next oFD
        On Error GoTo 0
    End With
    txtBOX1 = fileName
    Set fd = Nothing

txtBOX1 is the field that need to have the updated name and location in.  Suggestions would be most appreciated.

Within Outlook, I can create a link to a specific Outlook task with the EntryID like this and it works:


If you paste this into an email, create a hyperlink out of it, and send it to yourself and open the email, it brings you to the task.

Now I am in Access query query design view.  I've brought this address into a field and cannot figure out how to make  link out of it.

Thanks for your help.
A bit of a weird one here;   I recently updated on computer to a solid state drive that is about 30 times faster for read/write than a traditional HDD.  This PC both holds an MS Access back end as well as runs the front end that connects to the tables in the back end.   We have many other computers on the network that connect to the back end.  All computers till run MS access front end with no issues.  but, the computer that actually contains the back end on its SDD gets constant read/write conflicts since the upgrade to the faster drive.   Anyone experience this?  Is it possible the hardware is now to fast for MS ACCESS to handle.  It seems the tables are being written before the form can understand that it asked for the save?
I hate to go back to the standard HDD just because the new drive is too good for an old timer like ACCESS to use.  I am on latest version of OFFICE/MS Access.    Any insight on reducing or eliminating these read/write conflicts is greatly appreciated!
I am using an Access 2016 split database with the backend table on a network folder. The front ends are on each computer. That said, when I try to open the tables in my front end, I am getting an error saying "recordsets are not updateable". Further, if I try to open the tables with another user using the tables from another computer, I get locked out.

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.