Questions tagged [ms-access]

Microsoft Access, also known as Microsoft Office Access, is an application development and database development tool from Microsoft. It combines the Microsoft Jet/ACE Database Engine with a graphical user interface and software-development tools. Other database engines, such as SQL Server, can also be used as a database server for Access applications.

Microsoft Access, also known as Microsoft Office Access, is an application development and database development tool.

It commonly uses the Jet or ACE database engine, but is not limited to these.

It is a member of the suite of applications, included in the Professional and higher editions or sold separately. The current version is Microsoft Access 2016.
Applications built with Microsoft Access can be distributed to end users with a free run-time version of the application that lets them view databases without needing the full installation of Access.

This tag is version-agnostic. If you have a question about using a specific version, please tag your question appropriately so others know what version you are using. Ex:

and or if your question involves VBA.

Links

Common errors

Reserved Words

One of the most common problems with MS Access SQL is the use of a reserved word in a query or SQL string. It is often suggested that these words are bracketed, [RESERVED WORD], as is required for field (column) names containing spaces or special characters. But rather than trying to figure out what is and is not a reserved word and bracketing only those, using the convention of prefixing all field names with the table name — or better yet, the alias — will prevent this problem from occurring. This will save problems in other cases, not just reserved words. For example:

 SELECT a.id, b.id, b.name 
 FROM tablea a
 INNER JOIN tableb b 

It also makes the SQL compatible with other databases.

Connection Strings

The usual connection string for MS Access *.accdb files, that is, files created in Access 2007 format, is:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;

The ACE connection string is backwards-compatible and will open *.mdb files; however, for *.mdb files, you can also use:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\myFolder\myAccess.mdb;

Jet is often installed by default on Windows systems, but ACE is not. ACE is available in both 32-bit and 64-bit.

57313 questions
5
votes
3 answers

Monitor queries in an access database

Is there a way to monitor queries in an access database, similar to the way SQL Profiler works? I have a very old piece of software that I do not have the source for and it has an ODBC connection to an access database on another computer. Is there…
Eric Packwood
  • 1,039
  • 19
  • 40
5
votes
3 answers

How do I determine the MS Access Install path

I have a commandline invocation of MS Access like so: %Programfiles%\Office11\msaccess.exe How can I eliminate the "Office11" part so that the resulting invocation executes whatever version of MS Access that is installed? I have to run this on…
KalenGi
  • 1,766
  • 4
  • 25
  • 40
5
votes
2 answers

Why size of .mdb growing three times with small image?

I made few forms in Access 2010 and I add logo of company to the header form. This picture is .jpg and size of it is 70KB. I don't know why size of .mdb immediately increased from 4MB to 12MB? (few forms and the same logo) Maybe there is some…
mathewM
  • 139
  • 1
  • 1
  • 14
5
votes
4 answers

Force all users to disconnect from 2010 Access backend database

We have multi user frontend/backend MS Access 2010 application. We added a process that will close remote frontends when we want to do work on backend such as compact and repair. This is timer based check on table field that if has certain value…
curtisp
  • 2,227
  • 3
  • 30
  • 62
5
votes
2 answers

Access 2010 SQL Query find partial match in string of full word only

I hope this is a simple one, I just can't find how to get the result I want, maybe I am using the wrong keyword in SQL? I am searching an Employee table which contains a Full Name field, this field can be "Sam" or "Mr Evans" or "Mr Sam Evans" I am…
RockyRoad
  • 51
  • 1
  • 1
  • 3
5
votes
2 answers

Office interop: developing with 2003 PIAs on a machine with Office 2007

I have Office 2007 on my dev machine. I have a small app I'm building for a customer server with Office 2003 that needs to do some interop. My program will run as a scheduled task in a nightly batch process. No matter what I do, I can't find the…
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
5
votes
3 answers

Description of Table Field - MS Access

I've looked around and found a few VBA codes on how to grab the description out of the field's "Description" box, but not how I can use that in a form's properties. I'd like to have a ControlTip appear with the Description of that field brought from…
StuckAtWork
  • 1,613
  • 7
  • 23
  • 37
5
votes
3 answers

Error 2448: Can't assign a value to this object ... Why not?

Private Sub Form_Open(Cancel As Integer) Me.Bathroom = Forms!frmBathrooms!ID Me.txtBathInfo.Caption = "Bathroom Room Number: " & DLookup("Room", "tblRooms", "ID = " & DLookup("Room", "tblBathrooms", "ID = " & Me.Bathroom)) …
StuckAtWork
  • 1,613
  • 7
  • 23
  • 37
5
votes
3 answers

MS ACCESS Retrieving "Table Description" Through Query

I've been looking everywhere for a way of accessing a table's description (same one that appears when you right click a table>table properties) through a SELECT query. I tried using MSysObjects but I can only retrieve the name of the table using…
BadgerBeaz
  • 383
  • 3
  • 7
  • 19
5
votes
2 answers

ADO Command running multiple SQL statements: can't get error message back: USE THE Connection.Errors collection

I have some triggers on various tables that use raiserror to tell the user that he tried to do something bad. I would like to run several inserts and updates atomically, rolling back if one of the triggers says so. I was evil in a former life so I'm…
ajd
  • 423
  • 4
  • 11
5
votes
2 answers

CDate type mismatch error

I'm trying to convert a text field into a date using CDate() in a recordset but keep getting a type mismatch error. The input text format is MMDDYYYY. Does CDate not recognize this format? Do I need a separate function? Any ideas? Text Date ->…
regulus
  • 939
  • 3
  • 13
  • 21
5
votes
3 answers

In Memory, Stand-Alone, Disconnected ADO Recordset

I'm running this code on my datasheet subform when my form loads and I'm not getting any error messages or code breaks. My debug.print shows that the Recordset rs is filled with 2131 records like it should be, but my form shows a single row with…
HK1
  • 11,941
  • 14
  • 64
  • 99
5
votes
1 answer

double inner join in access db

I need to get some data from two tables, 1 people, 2 tasks, The following query in SQL works, and Access does not work SELECT Task_Id, e2.emploeey_name AS W_FROM, e1.emploeey_name AS W_TO, t.Task_Details …
user1095549
  • 1,339
  • 3
  • 12
  • 14
5
votes
3 answers

When should I move VBA code from a form module to a separate module?

I have quite a few instances where I start with a basic subform, then I have 3 other subforms which build on it, each adding some different elements to the basic ones. This means that I have a code page for each subform, with lots of repetition. Is…
Chelle
  • 177
  • 2
  • 14
5
votes
3 answers

Multi-level GROUP BY clause not allowed in subquery

I have a query as follows in MS Access SELECT tblUsers.Forename, tblUsers.Surname, (SELECT COUNT(ID) FROM tblGrades WHERE UserID = tblUsers.UserID AND (Grade = 'A' OR Grade = 'B' OR Grade = 'C')) AS TotalGrades FROM…
InvalidSyntax
  • 9,131
  • 20
  • 80
  • 127
1 2 3
99
100