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
4 answers

How can one set parameter values of an INSERT SQL query through VBA in Microsoft Access?

I am new to Access and I am coming from C#, SQL Server & .Net. There is a project that has come my way and I have to complete some parts. The scenario may be described as: An Access form with a subform An Access query that is the data source of the…
Romi24
  • 271
  • 2
  • 7
  • 15
5
votes
2 answers

Spell Check code in MS Access form field - throws error when change is accepted

I added the following code in the AfterUpdate event of a textbox in an MS Access form: Private Sub txtComments_AfterUpdate() With Me!txtComments .SetFocus If Len(.Value) > 0 Then DoCmd.SetWarnings False .SelStart = 1 …
Michael T
  • 1,745
  • 5
  • 30
  • 42
5
votes
6 answers

Obtaining textbox value in change event handler

I've written a form that performs queries asynchronously as text is typed into a textbox, however I somewhat arbitrarily seem to get the following error thrown: "You can't reference a property or method for a control unless the control has…
Kaganar
  • 6,540
  • 2
  • 26
  • 59
5
votes
1 answer

“User-defined type not defined” error in VB in Access 2007

I'm receiving a compile error on the following line of code: Dim oXL As Excel.Application The code is in VB in MS Access 2007. The line above is the beginning of a segment to generate an MS Excel file. The obvious answer to me was to ensure that…
Gedalya
  • 899
  • 4
  • 16
  • 28
5
votes
1 answer

How do I save the result of an SQL COUNT query with VBA in Access 2007?

I'm trying to count the number of records in a table that meet a certain criteria. My preference is to use SQL, not Dcount, as I want to get better at SQL. Here's my current code below: Dim countString As String Dim count countString = "SELECT…
andrewb
  • 5,200
  • 6
  • 36
  • 54
5
votes
1 answer

Can MySQL have one file per database?

I like the fact that a Microsoft Access .mdb file contains a complete database in a single file, so for example foo.mdb may contain all the data, table structures and queries for one database. I want to move over to MySQL. I understand that MySQL…
Nigel Alderton
  • 2,265
  • 2
  • 24
  • 55
5
votes
1 answer

Access 2010 allowing multiple users/ Implementing group security

I'm creating an Access 2010 database and would like some clarification when it comes to concurrency and security. What I would like is upon starting the app only a menu form to be displayed with several buttons including a login button. Most buttons…
HelloWorld
  • 283
  • 4
  • 12
  • 24
5
votes
4 answers

Converting MS Access "OLE Objects" back to plain JPEGs - best way?

Background: We have an old (but business-critical) SQL Server database with an MS Access ADP front-end; this was originally upsized to SQL Server from a series of Access databases. This database tracks hazardous materials for our customers, and…
Keith Williams
  • 507
  • 1
  • 3
  • 5
5
votes
2 answers

CountIf formula within MS Access report

Something terrible as happened with my poor attempt at adding a CountIf forumula to my access report. I am trying to add a formula within my report header to count the number of entries in my Service column that contain a certain word. The problem…
Kris
  • 83
  • 1
  • 2
  • 8
5
votes
2 answers

VBA procedure to import csv file into access

i need procedure in VBA to import data into access from csv excel file without some records,, as header and footer. Example,,, i have table in csv file, which contains some sentence which not belong table date A1 this is some sentence…
lama27
  • 59
  • 1
  • 1
  • 6
5
votes
4 answers

How to increase MS Access 2007 database size?

I developed a windows application, back end DB is Access 2007. I heard that max limit of Access 2007 is 2GB. Now my question is, is there any way to increase the size beyond that limit? How to create more than one db for a application to increase…
5
votes
2 answers

How to order the null values?

Using Access 2003 In my table column, some of the fields are null, some of the fields are number, and some of the fields are string Table. ID, Value 001 002 N/A 003 01 004 005 N/A 006 02 So on... I want to order the table by number, string then…
Gopal
  • 11,712
  • 52
  • 154
  • 229
5
votes
1 answer

Execute CStr() expression inside JOIN statement

I have two fields in separate linked tables with the same data, but different data types. I can't change the datatypes in the tables. I am trying a query that joins the two tables together based on this data, but since the types are different I need…
Tim
  • 301
  • 3
  • 13
5
votes
5 answers

Microsoft office Access database engine could not find the object

I created a test MS Access DB to export a table to Excel and a text file. This works for Excel: DoCmd.OutputTo acOutputQuery, "QryExportToExcel", _ acFormatXLS, XFile, False For the text file, I created a specification and used this…
shanmugamgsn
  • 820
  • 5
  • 16
  • 27
5
votes
5 answers

How to be productive in Access VBA + SQL development?

I'm a 80% ruby on rails developer, but still need to do some Access VBA work. Some of them are very shit systems, been build ages ago , used by the big enterprise globally , so that most of the works are just enhance the old system. The techniques…
Shuoling Liu
  • 491
  • 6
  • 19