Article ID: 275116
Article Last Modified on 6/7/2004
APPLIES TO
- Microsoft Access 2002 Standard Edition
This article was previously published under Q275116
Novice: Requires knowledge of the user interface on single-user computers.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
When you type data into a parameter prompt for a Memo field, you are limited to 255 characters.
CAUSE
The character limit for a parameter prompt is 255 characters, regardless of the data type defined.
RESOLUTION
When You Are Using a Query in a Microsoft Access Database (MDB) or a Stored Procedure in a Microsoft Access Project (ADP):
You can use the Query by Form technique to specify the criteria for a query.
For additional information about how to use the Query by Form technique in a Microsoft Access database, click the article number below to view the article in the Microsoft Knowledge Base:
304428 How to Use the Query by Form (QBF) Technique
For additional information about how to use the Query by Form technique in a Microsoft Access Project, click the following article number to view the article in the Microsoft Knowledge Base:
286828 How to implement Query By Form (QBF) in an Access project
When You Are Using an Inline Function in a Microsoft Access Project (ADP):
CAUTION: If you follow the steps in this example, you modify the sample Access project NorthwindCS.adp. You may want to back up the NorthwindCS.adp file and follow these steps on a copy of the project.
Open the NorthwindCS sample project, and then create the following inline function:
SELECT CategoryID, CategoryName, Description FROM dbo.Categories WHERE (Description LIKE @Enter_Description)
- Save the function as fnTest, and then close it.
- Create a form that is based on the function fnTest.
Type the following in the InputParameters property of the form:
@Enter_Description=Forms!frmParameter!Text0
- Save the form as frmTest, and then close it.
Create an unbound form. Add a text box to the form, and then set the following properties:
Name: Text0 Caption: Text0
Add a command button to the form, and then set the following properties:
Name: OpenForm Caption: Open Form
Set the OnClick property of the command button to the following event procedure:
DoCmd.OpenForm "frmTest"
- Save the form as frmParameter.
- Open frmParameter in Form view, type Cheeses into Text0, and then click the Open Form button.
Notice that you can type more than 255 characters in Text0, and that the form displays records that match the specified criteria.
MORE INFORMATION
Steps to Reproduce the Behavior
CAUTION: If you follow the steps in this example, you modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file and follow these steps on a copy of the database.
- Open the Northwind sample database.
- In the Database window, right-click the Categories table, and then click Copy.
- Right-click anywhere in the Database window, and then click Paste.
- In the Paste Table As dialog box, type tblMemo in the Table Name box, and then click OK.
- Create a new query. In the Show Table dialog box, click Close.
- On the View menu, click SQL View.
Paste the following code into the SQL View window:
PARAMETERS MyParameter Text; UPDATE tblMemo SET tblMemo.Description = [MyParameter];
- Save the query, and then run it.
Notice that the parameter prompt is limited to 255 characters.
Additional query words: pra prb
Keywords: kbprb KB275116