Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 44 additions & 25 deletions .openpublishing.redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,111 +6,130 @@
},
{
"source_path": "access/Concepts/Miscellaneous/alter-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/alter-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/alter-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/asc-desc-microsoft-access-sql-reserved-words.md",
"redirect_url": "/office/vba/access/concepts/structured-query-language/asc-desc-microsoft-access-sql-reserved-words"
},
{
"source_path": "access/Concepts/Miscellaneous/by-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/by-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/by-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/container-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/container-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/container-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/create-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/create-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/create-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/delete-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/delete-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/delete-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/drop-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/drop-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/drop-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/first-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/first-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/first-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/from-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/from-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/from-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/index-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/index-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/index-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/in-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/structured-query-language/in-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/insert-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/insert-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/insert-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/into-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/into-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/into-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/last-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/last-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/last-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/on-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/on-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/on-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/schema-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/schema-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/schema-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/select-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/select-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/select-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/selectschema-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/selectschema-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/selectschema-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/selectsecurity-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/selectsecurity-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/selectsecurity-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/to-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/to-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/to-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/updateidentity-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/updateidentity-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/updateidentity-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/update-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/update-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/update-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/updateowner-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/updateowner-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/updateowner-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/updatesecurity-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/updatesecurity-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/updatesecurity-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/user-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/user-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/user-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/view-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/view-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/view-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Miscellaneous/with-microsoft-access-sql-reserved-word.md",
"redirect_url": "/office/vba/access/concepts/Structured-Query-Language/with-microsoft-access-sql-reserved-word"
"redirect_url": "/office/vba/access/concepts/structured-query-language/with-microsoft-access-sql-reserved-word"
},
{
"source_path": "access/Concepts/Criteria-Expressions/quotation-marks-in-strings.md",
"redirect_url": "/office/vba/access/concepts/criteria-expressions/include-quotation-marks-in-string-expressions"
},
{
"source_path": "access/Concepts/Criteria-Expressions/use-multiple-fields-in-criteria-expressions.md",
"redirect_url": "/office/vba/access/concepts/criteria-expressions/multiple-fields-in-criteria-expressions"
},

{
"source_path": "access/Concepts/Criteria-Expressions/use-numeric-criteria-in-expressions.md",
"redirect_url": "/office/vba/access/concepts/criteria-expressions/numeric-criteria-expressions"
},

{
"source_path": "access/Concepts/Criteria-Expressions/use-textual-criteria-expressions.md",
"redirect_url": "/office/vba/access/concepts/criteria-expressions/textual-criteria-expressions"
}

]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ ms.date: 06/08/2017

# Option Base Statement

Used at [module level](../../Glossary/vbe-glossary.md#module-level) to declare the default lower bound for[array](../../Glossary/vbe-glossary.md#array) subscripts.
Used at [module level](../../Glossary/vbe-glossary.md#module-level) to declare the default lower bound for [array](../../Glossary/vbe-glossary.md#array) subscripts.

## Syntax

**Option Base** { **0** |**1** }

## Remarks

Because the default base is **0**, the **Option Base** statement is never required. If used, the[statement](../../Glossary/vbe-glossary.md#statement) must appear in a[module](../../Glossary/vbe-glossary.md#module) before any[procedures](../../Glossary/vbe-glossary.md#procedure). **Option** **Base** can appear only once in a module and must precede array[declarations](../../Glossary/vbe-glossary.md#declaration) that include dimensions.
Because the default base is **0**, the **Option Base** statement is never required. If used, the [statement](../../Glossary/vbe-glossary.md#statement) must appear in a [module](../../Glossary/vbe-glossary.md#module) before any [procedures](../../Glossary/vbe-glossary.md#procedure). **Option** **Base** can appear only once in a module and must precede array [declarations](../../Glossary/vbe-glossary.md#declaration) that include dimensions.

**Note** The **To** clause in the **Dim**, **Private**, **Public**, **ReDim**, and **Static** statements provides a more flexible way to control the range of an array's subscripts. However, if you don't explicitly set the lower bound with a **To** clause, you can use **Option Base** to change the default lower bound to 1. The base of an array created with the the **ParamArray** keyword is zero; **Option Base** does not affect **ParamArray** (or the **Array** function, when qualified with the name of its type library, for example **VBA.Array**).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
---
title: Bind a Form to an ADO Recordset
title: Bind a form to an ADO Recordset
ms.prod: access
ms.assetid: de85b07c-aa2d-7cf6-e0da-70b682f1bdd0
ms.date: 06/08/2017
ms.date: 09/21/2018
---


# Bind a Form to an ADO Recordset
# Bind a form to an ADO Recordset

To bind an Access form to a recordset, you must set the form's **Recordset** property to an open ADO **Recordset** object. A form must meet two general requirements for the form to be updatable when it is bound to an ADO recordset. The general requirements are:
To bind an Access form to a recordset, you must set the form's **Recordset** property to an open ADO **Recordset** object. A form must meet two general requirements for the form to be updatable when it is bound to an ADO recordset. The general requirements are:


- The underlying ADO recordset must be updatable via ADO.

- The underlying ADO recordset must be updatable via ADO.
- The recordset must contain one or more fields that are uniquely indexed, such as a table's primary key.







```vb
Private Sub Form_Open(Cancel As Integer)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,47 +1,39 @@
---
title: Create an ADO Connection String
title: Create an ADO connection string
ms.prod: access
ms.assetid: ac29e820-ffbf-a15b-e13d-c9190dfad6ab
ms.date: 06/08/2017
ms.date: 09/21/2018
---


# Create an ADO Connection String

To connect to a data source, you must specify a connection string, the parameters of which might differ for each provider and data source. ADO directly supports five arguments in a connection string. Other arguments are passed to the provider that is named in the _Provider_ argument without any processing by ADO.

# Create an ADO connection string

To connect to a data source, you must specify a connection string, the parameters of which might differ for each provider and data source. ADO directly supports five arguments in a connection string. Other arguments are passed to the provider that is named in the _Provider_ argument without any processing by ADO.

|**Argument**|**Description**|
|:-----|:-----|
| _Provider_|Specifies the name of a provider to use for the connection.|
| _File Name_|Specifies the name of a provider-specific file (for example, a persisted data source object) containing preset connection information.|
| _URL_|Specifies the connection string as an absolute URL identifying a resource, such as a file or directory.|
| _Remote Provider_|Specifies the name of a provider to use when opening a client-side connection. (Remote Data Service only.)|
| _Remote Server_|Specifies the path name of the server to use when opening a client-side connection. (Remote Data Service only.)|

The following example


| _Remote Provider_|Specifies the name of a provider to use when opening a client-side connection (Remote Data Service only).|
| _Remote Server_|Specifies the path name of the server to use when opening a client-side connection (Remote Data Service only).|

## Example

```vb
m_sConnStr = "Provider='SQLOLEDB';Data Source='MySqlServer';" & _
"Initial Catalog='Northwind';Integrated Security='SSPI';"
```

The only ADO parameter supplied in this connection string was "Provider=SQLOLEDB", which indicated the Microsoft OLE DB Provider for SQL Server. Other valid parameters that can be passed in the connection string can be determined by referring to individual providers' documentation.
To open the connection, simply pass the connection string as the first argument in the **Connection** object's **Open** method:

The only ADO parameter supplied in this connection string was `Provider=SQLOLEDB`, which indicated the Microsoft OLE DB Provider for SQL Server. Other valid parameters that can be passed in the connection string can be determined by referring to individual providers' documentation.

To open the connection, simply pass the connection string as the first argument in the **Connection** object's **Open** method:

```vb
objConn.Open m_sConnStr
objConn.Open m_sConnStr
```

It is also possible to supply much of this information by setting properties of the **Connection** object before opening the connection. For example, you could achieve the same effect as the connection string above by using the following code:


It is also possible to supply much of this information by setting properties of the **Connection** object before opening the connection. For example, you could achieve the same effect as the previous connection string by using the following code:

```vb
With objConn
Expand Down
Loading