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

We have an Access database that sends out pay stubs every week.  All of a sudden it stops and gives this error.
We end and start again, and it runs.  We cannot figure out why it is doing this randomly.

How do we prevent it from doing this?

Hi, i need to create an Access database, to collate all the software in use in an organisation, it would need to identify which teams/users use each application, & information on vendors. I'm hoping someone here can point me towards a template I can start with or a good tutorial .

I want to have a button where a user clicks to add attachments  but dot know the code for the button, because i have dummy users i need  to prompt the users to add attachment to the Investigation form.  The other idea I had was a pop up dialog box that promps the user how to add more attachments to the form if needed.
I have a list box and would like to determine which records are selected in which order. List box is using multiselect. if listbox contains for example 10 records, i need to identify when the user selects record #10 then, record #2, then record #5 in the sequence in which the user selects them. Getting the selected records are easy enough but getting them in the order in which they are selected has been an issue.

this listbox contains files located in a tempfolder that user selects that they want to combine into one pdf file. the pdf file has to be created in a particular order thus the reason to combine the files based on the users selected order.
SELECT DISTINCT MaximoReport.[Assigned Owner Group]
FROM MaximoReport
WHERE (((MaximoReport.[Assigned Owner Group]) Is Not Null));

But i only want it to show the following groups.
I have a table with the following fields
Target Start Hour
Scheduled StartHour
ActualStart Date
Actual Finish

I have a query  

SELECT Count([MaximoReport].[WorkOrder])/(SELECT Count(MaximoReport.WorkOrder) AS [Total LEWPM Den]     FROM MaximoReport     WHERE (((MaximoReport.WorkType)="PMINS"      Or (MaximoReport.WorkType)="PMOR"      Or (MaximoReport.WorkType)="PMPDM"     Or (MaximoReport.WorkType)="PMREG" Or (MaximoReport.WorkType)="PMRT")      AND ((MaximoReport.Status)<>"CAN")      AND ((IIf(Len([Target Start])>10,[Target Start],[Target Start]+[TargetStartHour]))     >=DateAdd("h",-11.8,[Forms]![ParameterReportF]![DateFrom])      And (IIf(Len([Target Start])>10,[Target Start],[Target Start]+[TargetStartHour]))    <DateAdd("h",23,[Forms]![ParameterReportF]![DateTo]))))*100 AS PerecentageCompleted
FROM MaximoReport
WHERE (((MaximoReport.WorkType) In ("PMINS","PMOR","PMPDM","PMREG","PMRT")) And ((MaximoReport.Status) Like "*COMP") And ((MaximoReport.[Target Start])>=DateAdd("h",-1,Forms!ParameterReportF!DateFrom) And (MaximoReport.[Target Start])<DateAdd("h",23,Forms!ParameterReportF!DateTo)) And ((MaximoReport.ActualLaborHours)<>"00:00") And 

Open in new window

We are moving to Windows 10 and Office 2016. We have an Access database and forms, which works fine in Windows 7, and Office 2010. Opening the database in W10 and Office 2016, and all the date fields have disappeared. In Win7 and Office 2010, these dates appear as a datepicker2, but in W10, the fields are wiped from the forms. I'm trying to add them back, and the information that I have found has said that you create a textbox and then use Format in the properties to change it to a date. The problem is that when I open the properties there is no Format.
I am a self taught Access database creator over the last ten years. I have created a system that is used to track information about various quality problems with in my organization. We have problems that are shared internally on a daily basis. I would like to create emails for each occurrence that notify my teams about each issue that is entered.

Currently, I have a table that holds all of this information and can navigate the records in a form. I would like to create a .PDF for each record that will be emailed announcing each issue.

I would like to be able to push a button and create a report in a .PDF file and save it to folder.

What is the best way to create this .PDF for each record?
I have a simple form to navigate some records in a table.

I'd like to be able to press a button to create a .PDF of that record that is active in the form.

With in that form I have three fields that I'd like to use as part of the name to save the .PDF in a predetermined file.
(If possible, I'd like to separate them with a space or an "_" or something.
Control Source

Save it in a designated folder that is with the folder that the database is held in.
We just set up Remote Desktop Services on this 2012R2 terminal server. The RDS is set up to use "Session-based" desktop deployment.
We published "File Explorer" where a "MS Access" short will take our teleworkers to get into a MS Access database file located on the terminal server. If the users use "mstsc /admin" they are able to open the Access database with full access (only one user access at a time.) But if they use "RD Web Access", they will get the Read-Only accessibility on this Access database file even there is no other user accessing at that time.)

Why does it become Read-Only while using "RD Web Access"? How to resolve? Please help.
Hi Experts,

I have a procedure that is supposed to be running all the time.
It checks for existence of some files, if it find them it starts executing one by one.
Have created a form which calls that procedure and keeps informing the status, which file file is it currently processing...
Now I have the following dilemma.
When I stop execution (Contrl+Break) and want to resume, I have no way to get focus back to the main form.
How can I accomplish that?

in MSACCESS Report"

I need some phrases to be in different Formats.  Example:

This is plain text This is Italics this is plain text again and this is bold

Also I would like to embed a jpg or bmp in the text, for example a signature (that was captured as jpg or bmp) at the bottom of a letter,

Ideas anyone?  Thanks again.
ole/dde timeout in access.  I changed it to 0 but my query is still timing out.  How do I change it so the query does not timeout.  It is only running for a couple of minites when it timesout
I have a 2016 MS Access - Word application.  The database has the front-end code stored in an Access db on each user's c-drive, and that front-end db links to the actual data which is stored on a fileserver.  This application supports MS Word 2016 mail merges.  These mail merges all have one datasource which is driven by a single temp table that is created on the user's local db copy.  If that single user wants to open more than one merge letter, they receive a run-time 3009 stating that 'you tried to lock table 'blah blah' while opening it, but the table cannot be locked because it is currently in use.  Wait a moment, and then try the operation again."

From what I can tell, the first merge letter is using an exclusive lock on the MS access temp table datasource.  Is it possible that the merge letter cannot use an exclusive lock allowing the single user to open multiple merge letters that are all based on the same temp table?

Thank you in advance!  -Jason
Hi Experts,
I have an application that was running fine on my pc, and whenever I wanted to stop code execution by pressing Contrl+Break it stopped.
Now I moved the application to the Server and tried a couple of times to stop it and could not get it to stop, had to kill the application.
What can this be?
PS. Use Access special keys = true.
Between autoexec macro and the ribbon, wich launch first within MS access, when a database is secured ? (prevent special hotkeys / do not display tables ect ...)
I am new to MS Access and I need to edit a MS Access 365 report.

I need to add a condition that shows a different email address based on what choice someone makes from the radio buttons.

If the person chooses the last Radio button (AIM Consulting) then they will see a different email address within the report.

Form Radio Buttons
Label Address
those are the results of the query:
UserName                              YY              MM                      Status                            Approach              SC#
Peter Pan                             2018      11                      Status 1                           A                       123
Peter Pan                                2018      11                      Status 2                         A                        123
Peter Pan                                2018      11                      Status 3                         A                       123

i need to make that (below)

UserName                              YY              MM                      CountStatus               Approach           Distinct SC# Count
Peter Pan                             2018         11                   3                                   A                          1

this is my final query:

SELECT Data.UserName, Count(Data.[SC#]) AS [SC#Count], Data.YY, Data.MM, Count(Data.Status) AS CountOfStatus, Data.Approach
FROM qryResultsDumpInitial as Data
GROUP BY Data.UserName, Data.YY, Data.MM, Data.Approach;

instead of I am getting:  The number of SC# should 1, not 3

UserName      YY              MM                      CountStatus               Approach           Distinct SC# Count
Peter Pan      2018        11                   3                                   A                          3

how to fix that
I have an option box with 3 options in a continuous form.  As I scroll down the page with either the scroll arrow keys or the mouse wheel some will show 2 boxes checked.  If you click on it, it will correct itself but it is very confusing for the user.  It does not happen if I scroll a page at a time.

I built a new database with a new form and new option box and it still has problems.  Any Ideas?
I have many queries were simply to come up with a number that is a count of records with a specific criteria, to be used later in a calculation. Because those criteria are so lengthy, and change with each variation of the dataI am  collecting, I’m not sure if an IIF structure would return the results you want. Crosstab queries can get quirky when fields are not available on different data runs. And to be honest, a crosstab query is really just a type of pivot table like in Excel, but not as flexible. I want to do most (if not all) of the count-collecting in VBA using recordsets or the DCOUNT() function. Then, dumping the values into a temporary table and base the report off of that. The queries I  already have built are doing pretty much what I described, but when I try to link them together for your final report, if anything had missing or null values, it causes problems. Doing the work in VBA givesme much more flexibility in handling these situations.
 But I do not know how to write up the function to do that how can u do what is above?
I have a Access DB that I working on which has forms and subforms. I have an area where I need to be able to add car makes models and colors. I am able to bring up a dialog to create a new color or Make but Need the Dropdown update with the new set of options after closing the dialog.

i want to join two queries so i can take the count of one query and divided by another query to get the percentage of work orders that were completed.

the numerator query:

SELECT Count(MaximoReport.WorkOrder) AS CountOfWorkOrder
FROM MaximoReport
WHERE (((MaximoReport.WorkType) In ("PMINS","PMOR","PMPDM","PMREG","PMRT")) AND ((MaximoReport.Status) Like "*COMP") AND ((MaximoReport.[Target Start])>=DateAdd("h",-1,[Enter the start date]) And (MaximoReport.[Target Start])<DateAdd("h",23,[Enter the end date])) AND ((MaximoReport.ActualLaborHours)<>"00:00") AND ((MaximoReport.ActualStartDate)>=DateAdd("h",-11.8,[Enter the start date]) And (MaximoReport.ActualStartDate)<DateAdd("h",23,[Enter the end date])));

Open in new window

the denominator query

SELECT MaximoReport.WorkOrder, MaximoReport.WorkType, MaximoReport.Status, MaximoReport.[Target Start]
FROM MaximoReport
WHERE (((MaximoReport.WorkType) In ("PMINS","PMOR","PMPDM","PMREG","PMRT")) AND ((MaximoReport.Status)<>"CAN") AND ((MaximoReport.[Target Start])>=DateAdd("h",-11.8,[Enter the start date]) And (MaximoReport.[Target Start])<DateAdd("h",23,[Enter the end date])));

Open in new window

What i want is combine two queries so i can have one query do it all instead of three.
Hi please find below vba script, which helps me to copy range of excel cells and save it as a jpeg file. I want this code to run from ms access vba editor.


1. Open an excel workbook
2. Go to a given tab
3. Copy range of  cells.
4. Save as a jpec file in a given folder

Please have a look

Sub ExportRange()

   Const FName          As String = "C:\TEMP\export.jpg"

   Dim rng              As Range

   Dim shtTemp          As Worksheet

   Dim chtTemp          As Chart


   Application.ScreenUpdating = False

   '// Change range as needed

   Set rng = Worksheets("Sheet1").Range("A1:C10")


   '// Add a temp worksheet. Chart will be placed on this. It will be deleted after

   Set shtTemp = Worksheets.Add

   '// Add chart


   '// Move the chart to the new sheet and get a reference to it

   ActiveChart.Location Where:=xlLocationAsObject, Name:=shtTemp.Name

   Set chtTemp = ActiveChart


   '// Copy and paste the range

   rng.CopyPicture Appearance:=xlScreen, Format:=xlPicture



   '// Export

   chtTemp.Export Filename:=FName


   '// Tidy up...

   Application.DisplayAlerts = False


   Application.DisplayAlerts = True

   Application.ScreenUpdating = True


End Sub

Open in new window

Thank you
We are moving from Windows 7 to Windows 10, and from Office 2010 32-bit to Office 2016 64-bit. We have recently had some issues with our testing of Access databases in the new environment. When opening a database, we are getting a 'First Things First' pop-up pop-up which gives us the option to install some updates OR proceed with caution. Now we have had a variety of results when continuing from here:
- click 'Ask Me Later', and things have worked fine
- click 'Ask Me Later', and things have imploded (forms not working initially then could not open the database)
- click 'Install Updates' and things have worked fine

On the database that imploded, as it was opening initially, the forms were coming up with an 'Error' pop-up and the only option we were given was to click Ok. Closing and then trying to re-open the database using Access 2016, we got a syntax error message. This message also came up when we tried to open the database in Access 2010.  We eventually figured out that some references were updated, was able to restore the database and get it working again in Access 2010.

When we clicked 'Install Updates', I was expecting quite a delay in opening the database, but that was not the case. It opened almost immediately, so I'm not sure what updates were installed.

So my questions are:

- What is the proper (correct) way of moving Access DBs from 2010 32-bit to 2016 64-bit? Conversion tool?
- What updates are done when you select 'Install' on the …
Hello, I have an Accounting access program I am upgrading to win 10. All the queries run except one that has a lot of Where parameter (5 of them).

I keep receiving the error "System resources exceeded".

I can not change the query due to the business requirements.

Any advice?

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.