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

See environment below

Need VBA running in either Access (preferred) or excel which will add/delete a user to a sharepoint group and also list all members of a group into a table or excel sheet.

I've tried the OData approach for getting all users but unsure how to get it working in Access.

Environment: SharePoint 2013 - onprem, full control only (no SCA), and no farm access (no powershell).

VBA examples sought - not C##, powershell, ...
I am getting the attached error or confirmation when I run my macros in MS Access how can I select the answer yes by default without clicking.


Hello, All.

OK, what used to work, no longer work.
A multiple row insert, will now only, insert all into a single field.

environment: Windows 10 Pro / IIS
inserting into a Microsoft Office Access Database ACCDB
(This is a site for the intranet, and not for the internet. Which is the reason for using the access database)

Code, that used to work.

The form has all TEXTAREA's that are feeding into the insert form.

arrMN = Split(Request.Form("MediaName"), vbCrLf)  
arrMF = Split(Request.Form("MediaFile"), vbCrLf)  
arrMB = Split(Request.Form("MediaBand"), vbCrLf)  
for i=0 to uBound(arrMN)
  Set objDoubleInsert=CreateObject("ADODB.Command")  
  objDoubleInsert.CommandText = "INSERT INTO EVMediaServer (MediaName, MediaFile, MediaBand) VALUES (?,?,?)"  
  objDoubleInsert.Parameters.Append objDoubleInsert.CreateParameter("@MediaName", 200, 1, 255, arrMN(i)) 
  objDoubleInsert.Parameters.Append objDoubleInsert.CreateParameter("@MediaFile", 200, 1, 255, arrMF(i))  
  objDoubleInsert.Parameters.Append objDoubleInsert.CreateParameter("@MediaBand", 200, 1, 255, arrMB(i))  

Open in new window

before, this code used to create as many rows as I had in the fields.
But now, all of it is inserted into ONE ROW, and all the lines are in one column.

What is going on?
Thanks for any and all assistance on this one.

I can no longer run compile on the debug function. This came to my attention last Friday
because a number of problems started to occur. I picked up on this problem yesterday
when trying fix problems.

I am unsure if this problem is related but I do know that it's not right?

Please help
I have a Access Database 2016 that connects to an SQL Server 2012

all forms use the following code to get data:

Public Function GetFormData() As ADODB.recordset

    Dim cnn As New ADODB.Connection
    cnn.Open sqlServerConnection
    cnn.CursorLocation = adUseClient
    Dim cmd As ADODB.Command
    Set cmd = New ADODB.Command
    cmd.ActiveConnection = cnn
    cmd.CommandType = adCmdStoredProc
    cmd.CommandText = "Form_Data_Stored_Procedure"
    Set GetFormData= cmd.Execute
End Function

Open in new window

in the Form_Open even I have the code

Set Me.recordset = GetFormData()

Open in new window

this works fine but I cannot right click on a column and sort the data.

this stopped working when we upgraded to Access 2013

how can I sort by right-clicking?


i would like to programmatically change the taskbar height using VBA. Thanks
Good morning....

 We have an old accounting System (Sales, Purchases, ledgers, receivables, inventory, etc) called RTS-ADVANTAGE.  
To get specific and customized reports from that system, we have to Export the information via TXT files.   After we have the TXT files we LINK those files to MS-ACCESS, where we can build queries and reports.
The Export process is done using Macros in RTS-Advantage, which runs every 2, 5, 6 hours (let's say).
The process of exporting the information is sometimes slow and is not live.   The users needs real live information (the most possible) and running the macros to export is tedious.

Our need:
We are looking a solution to CONNECT (at least READ) the information DIRECTLY from the RTS-ADVANTAGE tables or files, so no exportation is needed and we can build queries and reports in MS-ACCESS (Preferably).  It might be ODBC for instance.  
NOTE:  RTS-ADVANTAGE was built using C++ and it uses ISAM files.
Please find attached Data Files and Pictures (Power Point) showing the program and Explorer structure.

Looking forward...
I have a date field and I'd like to for it to add "Todays" date as a default. I need it to be editable so that I can change it if needed. Is there a simple way to do this?
Since my client has updated to Windows 10, embedded logo images are lo longer showing on reports.  Any ideas how I can resolve this?
Move the current leave balance to next year in access database?
Below is a screenshot of the database. I want to move the current balance of 2018 to 2019 of all employees.
How this can be done? Or how can I automate this on 1st Jan of every year.
Below is my code:
Public Function getFormName(frmName)
Dim frmDispatch As Form
Set frmDispatch = Forms!dispatchBoard!Board1.Form              '' This line works fine"    "Please see the problem below"
getFormName = frmDispatch
End Function
The Problem:
In the line "set frmDispatch". I don't know the subform (Board1 is a subform example only). The subForm name  i need to process is passed to the function (frmName is the variable passed to the function)
I need a query like this that will give me the number of dogs (id is 2) we had on any day of the year, e.g. 1/1/2017.  I waqnt to use the Switchboard txtenddate

SELECT Count(SoftSlips.SoftSlip) AS CountOfSoftSlip
FROM SoftSlips
WHERE (((SoftSlips.ImpoundDate)<=([Forms]![frmSwitchboard]![txtEndDate])) AND ((SoftSlips.ActionDate) Is Null) AND ((SoftSlips.ImpoundCode) Not In ("v")) AND ((SoftSlips.SpeciesID)=2));
I need the proper syntax to delete an excel file [PROBLEM_LOG.xlsfrom a folder prior to the running the following code.
The following code gets a syntax error. When i manually delete the file gets saved with NO problems.

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "ProblemLog", CurrentProject.Path & "\" & "PROBLEM_LOG.xls", True

Open in new window

Is it possible that the current version of windows, office 365 (access) and server 2019 are not compatible with virtualized machines???

MS Access (o365) is deleting indexes and tables during compact and repair operations with Win10 Pro.  The front end machine is an i5 win10 pro machine.  BE virtual machine with one cpu and 4 cores.

I can consistently reproduce the problem just by running the compact operation with multiple databases.  No error messages are produced during the process, however, a system table is created when a failure occurs.. I don't remember the name buts its obviously a system table with very cryptic info.. one or two rows and no significant data...

When I use infinity to disable all but one core, the process compacts without errors consistently.

Please tell me there is a better solution than programmatically using infinity!

I have just updated an old 2002 mdb to Access 16 accdb. When I click on any report opening button the report starts to load but the underlying code windows flash on the screen in a semi hidden way until the report is ready to display. There must be some property that stops this. In the old 2002 mdb you could write Echo False and the screen would freeze , although sometimes not freeze, and then render the report. Is there a similar command for access 16. I tried Echo command in 16 and find it has no effect
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

Need the code so I can:
Open a Report in design view
Go to a text box and stop code for operator input
go to another textbox and stop code for operator input (I have 28 text boxes that I need to change, they are all in the same report.

Thank you for your response
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.

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.