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 am using Access to create a Request To Quote. I currently have a form  with fields that need to be filled in. Currently, when
you hit the save button, the ID will be assigned. Is there a way to either have the ID automatically assigned when the form opens,
or is there a way to reopen the form automatically  after saving the form to display what ID number was assigned to the transaction?
Thank you...
Does Your Cloud Backup Use Blockchain Technology?
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

I am moving a customer from a 2003 server with AD installed to a NAS drive. There are only 3 computers that access it. In the past I have used the tool Profwiz to convert a domain account into a local account and vice versa. Is there a better way to do this? One thing I don't like about this tool is that all it really does is create a new account and redirect all the folders to the other accounts directories.

I have the following statements:

Set Dbs = CurrentDb()
Set xR = Dbs.OpenRecordset("Select Rm1Bd1,Rm1Bd2,Rm1Bd3,Rm1Bd4 FROM QUOTESDETAILS Where Resid = 1")

I need to create the sum of all of the variables. Is it possible to use something similar to this:

For I = 1 to 4
  xSum = xSum + xR!["Rm"&I]

Thank you for any help!
What is wrong with this?

Me.txtTotalScrapToDate = Nz(DSum("[QtyScrap]", "tblFinished", "[OpenOrdRecID] = '" &; Forms!frmShipments!txtOpenOrderRecID &; "'"),0)

Note:  OpenOrdRedID is a text field.
How do I get an access report to give me percentage of Group1 totals, over the detail items in the other two groups.

I have a income statement that i want to show a percentage of sales for each item in the detail for each group. Cost of sales, and operating expenses.

I have attached sample report.

I am using a cross tab query report, so i can't just do a sum on the field, because the field will change depending on the periods.
I usually would try to code around this but i can't seem to figure this one out.

Currently the report will give me the percentage of just each groups total for the detail items.

Infra: Dag x2016

Clients: Outlook 2016

Small question, in the LAN, when users no longer have access to the Internet (eg gateway failure fault) or box etc ... is it normal that the internal outlook requests authentication?

Same, from the outside, I have random connections on outlook. For example, I can make an outlook 2016 profile, the autodiscover runs correctly, it connects a first time but randomly, as soon as we close outlook and we reopen it asks for authentication.

The config is the following for all

Domain:> Internal & external URL for all services (EAS, EWS, OWA, MAPI etc ...)

Same for OA:> internal and external

All authentication is in NTLM (IIS and clients)

In the local dns I point to the 2 servers.

Thank you for your help ! :)
I have a document with multiple tables.  The next to last table needs to have the width of the 3rd column set so that it is the width of the text in the column so that the single element in the column doesn't get cut across 2 lines.  For example, one row has something like
C2AJ_YZ-10-AB-002.  Currently, this column cuts the string after the first hyphen, but I'd like the column to fit the text in one row.
   My first issue is how to access the correct table.  (This table will always be the next to last one.)  Then, how do I set the width of the whole column to be the same width as the text in that column?

Chris Cote
I currently have Excel importing data from an Access db, however, the database is moving to a Virtual Machine that we have with MS Azure.
I am unsure what I need to do to connect to the db once it's moved.  The Excel will still be on my local machine.
We currently login to the VM via Remote Desktop Connection.  Within the VBA, what do I need?  Do I need to enter the password (as I do when I connect via RDC)?

thanks in advance

I'm currently using the following code to search a recordset and return email addresses. It works well. That said, I would like to change the search criteria to a text value but I don't seem to be able to do that.  My code

 With Me.Parent.ClientAdditionalStaffTbl_subform.Form.RecordsetClone
 If .RecordCount Then 
    Do While Not .EOF
    If .Fields("CC") = True Then
    GetCC = GetCC & .Fields("Email") & ";"
    End If
  GetCC = ""
  End If
  End With

Open in new window

I want to make the criteria another field "another" where the value is "text" but this doesn't seem to work

    If .Fields("Another") = "text" Then

It doesn't return any values despite the criteria being correct. I'm not sure what to do.

I have a Access front end with SQL back end currently on a shared path.  To access the database a script/launch file is run and would copy over  a copy of the front end database to the local Temp directory.  However this is no longer possible when the local machine has been migrated to SQLServer2012R2.  Is there an equivalent/recommended system path I can use?  This is simply a quick migration and I do not want to change much of the code around how the access database functions.

Free Tool: SSL Checker
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

I am a VB .Net guy and feel very much like a fish out of water in VBA.  Need help working with Nulls coming from a DB field into a VBA function for further processing.  Any help would be greatly appreciated.

I have a VBA function that takes a few parameters and runs some extensive logic on them to come up with a True or False result.

The call to the function is currently in the Query Designer interface as a column.  The call to the function is bStaleDates([Run Ordered]).

The [Run Ordered] field is a date field but can be null if the item has not yet been ordered.

The code for bStaleDates(dDateIn as Date) as Boolean does some testing and returns True or False which is the value tested in the Query Designer's Criteria entry.

The problem are the null fields.  If I leave the dDateIn as Date, nulls blow up the query.  I thought I would try dDateIn as Object and Variant and test for IsNull() but that did not work either and query still blows up on data type mismatch when the field is Null.

I need the records where the field is Null so I can't eliminate them during the query before sending to my code, but I need a way for the code to correctly handle the Nulls so that the code can receive the parameter, perform a Null check, and then if it is a valid date, perform the rest of the testing on the value.

This is the issue in a nutshell and simplified.  The actual code has about 9 date fields being passed to it from the record as the testing involves looking at how …

I have an issue I would like someone to help me to solve it.

I was searching how can I protect my Access Database file not to be used on another PC, so I find a way to create a dummy file and to call this file the first thing in my welcome form page.

I did face 2 errors after running it attached are the screenshots for both of them.

And the VBA code you can see it below:

Application.FollowHyperlink "C:\Windows\System32\startcheck.dll"

For the Security notice I did try many solutions to turn it off, but non of them did work.

And for the run time error I have no idea from where most probably from the VBA code.

Thanks for your help,

Can somebody explain for me the issue I am having? I am trying to filter the column case but the value list is empty while the column contains data.

Thank you

I am using the following to grab an image

  Set l_Attach = colAttach.Add("C:\Archetype Logos\Logo.jpg")

Open in new window

but I would like use a file path from a field in my form. Is there a way to reference the control? I tried

  Set l_Attach = colAttach.Add("Me.Field")

Open in new window

But that didn't work. Is this more complicated than I presume?
Hello Experts,

Attached are two files, the MS Access db where I am trying to create multiple records based on the comments fields in the one record. The MS Excel spreadsheet contains a sample of what I am trying to accomplish.

I am able to move the records to a new table, but I am lost on the step where I want to duplicate the record based on how many comments are in the note field.

The attached Excel spreadsheet is a sample of what I am trying to accomplish based on MS Access ID=621.

Can you please help me out?

Thank you,

Hi Experts. I have three textboxes which only show when a button is checked then subsequently the values in the text boxes are summed up. My existing solution is returning empty using   ![Bill] = Nz((Me.txtPharmAmt1 + Me.txtPharmAmt2+ Me.txtPharmAmt3), 0).
I need code for add image in database.. ?
From the main form, I want to read thru the records on a subform
I found some code on EE and this is what I’m trying to use:

Private Sub readThruTASubformEntries()

Dim rs As DAO.Recordset

'Set rs = Me!SubformControlName.Form.RecordsetClone  ' as is from EE
Set rs = Me![TAX AUTHORITIES ON THIS PLAN].Form.RecordsetClone

While Not rs.EOF
    MsgBox "User Assigned Priority: " & Nz(rs!UserAssignedPaymntPriority)
Set rs = Nothing

End Sub

Open in new window

When I open the form it is positioned in the first record in the Install Plan table.

Clicking the ‘Bogus Test Read Thru Subform’ on the first main form record yields the expected results.  The msgbox displays the Priority of the first record then the priority of the second record.

When I use the ‘next record’ selector arrow, the next Install Plan is shown on the screen.  This install plan also has multiple entries in the subform.  But, when I click ‘‘Bogus Test Read Thru Subform’ nothing displays.
I put a breakpoint on ‘While Not rs.EOF’ and is shows rs.eof as ‘True’.

Does anyone know why reading the records in the subform only works on the first record shown?

Also, assuming this does work:  Is it possible to bring back the subform records in a sorted order rather than the order they appear in the form?
I also attached a snapshot of the formRead subform
I've received a lot of help in using Outlook VBA to send emails from Outlook to my split Access database (Front End/Back End)
However, I put the data back into the database so there is no longer a back end.
Since I have Access opened and am trying to pass the information across, as soon as I try to open/assign the connection I get an error saying the database is locked (by me).
The connection code looks like this:
adoConn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source =C:\Work\Access\Mydb.accdb;Persist Security Info=False sSQL, adoConn,adOpenKeyset,adLocOptimistic

Open in new window

It errors on the adoConn.Open line.
Anyone have any ideas on correcting the issue?

Enroll in July's Course of the Month
Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

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?
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 " & _

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.