Tuesday, March 15, 2016

How to Fix - 2 questions, search form, limit characters in a textbox?

2 questions, search form, limit characters in a textbox

OK, so I am very new at Access 2007 and have been teaching myself and have gotten myself pretty far.
However, I believe I have reached a dead end of my self taught abilites.
I have a form, a table, a query and a report.
I want the form (with unbound textboxes) to search the table through the query.
When I recieved the results of my search I want the report to list the results so that I can print them out.
In the query I have Fields listed and Table listed.
In the criteria portion of the query I have the following:
Like "*" & [Forms]![Search Form].[Last Name] & "*"
Also on the form I have a control button to run the query:
DoCmd.OpenQuery "Query", acViewNormal
When I click the control button it does run the query but it doesn't list any results.
So I know it is not the button that is not connected to the query and I have indexed several of the fields to Yes duplicates OK.
I am not sure why I received zero results when I search with this method.
There must be a better way of doing this.
Any help (when given in a step by step manner) is greatly appreciated.
My second question is: Is there a simple way to limit the number of characters that can be enter into a text box on the form? I have a zip code field that I want to limit to 5 characters without going through all the coding of modules that I can't do or
Thanks for the help I greatly appreciate it.

Anwsers to the Problem 2 questions, search form, limit characters in a textbox

Download Error Fixer (Free)

You can also limit the textbox entry by setting the Input Mask, for example ????? limits input to 5 characters of text.  You might want to check out all the available codes.
Here is a little more:
You can define an input mask by using the following characters.


Digit (0 to 9, entry required, plus [+] and minus [–] signs not allowed).

Digit or space (entry not required, plus and minus signs not allowed).

Digit or space (entry not required; spaces are displayed as blanks while in Edit mode, but blanks are removed when data is saved; plus and minus signs allowed).

Letter (A to Z, entry required).

Letter (A to Z, entry optional).

Letter or digit (entry required).

Letter or digit (entry optional).

Any character or a space (entry required).

Any character or a space (entry optional).

, : ; - /
Decimal placeholder and thousand, date, and time separators .
(The actual character used depends on the settings in theRegional Settings Properties dialog box in Windows Control Panel).

Causes all characters to be converted to lowercase.

Causes all characters to be converted to uppercase.

Causes the input mask to display from right to left, rather than from left to right.
Characters typed into the mask always fill it from left to right.
You can include the exclamation point anywhere in the input mask.

Causes the character that follows to be displayed as the literal character (for example, \A is displayed as just A).


Setting the InputMask property to the word "Password" creates a password-entry control.
Any character typed in the control is stored as the character but is displayed as an asterisk (*).
You use the Password input mask to prevent displaying
the typed characters on the screen.

When you type data in a field for which you've defined an input mask, the data is always entered in Overtype mode.
If you use the BACKSPACE key to delete a character, the character is replaced by a blank space.
If you move text from a field for which you've defined an input mask onto the Clipboard, the literal display characters are copied, even if you have specified that they not be saved with data.


Only characters that you type directly in a control or combo box  are affected by the input mask.
Microsoft Access ignores any input masks when you import data, run anaction query , or enter characters
in a control by setting the control'sText property in Visual Basic or by using the SetValue action in a macro.

When you've defined an input mask and set the Format property for the same field, theFormat property takes precedence when the data is displayed.
This means that even if you've saved an input mask, the input mask is ignored
when data is formatted and displayed.
The data in the underlying table itself isn't changed; theFormat property affects only how the data is displayed.
The following table shows some useful input masks and the type of values you can enter in them.

Input mask
Sample values

(000) 000-0000
(206) 555-0248

(999) 999-9999
(206) 555-0248

( ) 555-0248

(000) AAA-AAAA
(206) 555-TELE




MAY R 452B7

>L0L 0L0
T2F 8M4





SSN 000-00-0000
SSN 555-55-5555


If this answer solves your problem, please check Mark as Answered.
If this answer helps, please click the Vote as Helpful button.
Cheers, Shane Devenshire

Open Action Center by clicking the Start button Picture of the Start button, clicking Control Panel, and then, under System and Security, clicking Review your computer's status.

Make sure your computer has at least the minimum amount of random access memory (RAM) required to run the program that is displaying the error. Look for the program requirements online or in the packaging information.

Another Safe way to Fix the Problem: 2 questions, search form, limit characters in a textbox:



How to Fix 2 questions, search form, limit characters in a textbox with SmartPCFixer?

1. Click the button to download Error Fixer . Install it on your computer.  Open it, and it will perform a scan for your system. The errors will be shown in the list.

2. After the scan is done, you can see the errors and problems which need to be repaired.

3. When the Fixing part is done, your computer has been speeded up and the errors have been fixed

Related: 1327 Invalid Drive Z Error Code 80004004 Error Code 137 80072ee7 Fix 3315 Error 26 3213 1726 0X6be Error Code 1393 Acaptuser32 dll Error 3050 Biosinfo dll,Fast Solution to Fix Error 1017 Received Logging On To The Standby Error,Installation Error 1706 Error Fixer,Loopback Failure Error - How to Fix,How to Fix Pro Registry Cleaner Error,How to Fix Win 7 Installation Error Code: 0x800705070 Error Quickly
Read More: 2011 windows live messenger yüklenmiyor [Solved],Troubleshoot:2011 Word for Mac - My center alignment and all alignments for some reason, no matter what will move my whole paper instead of the highlighted text,[Solution] 2 laptops 2 desktops all on network but 1 laptop has no access to internet wired or wireless what should i do,How to Fix - 2 much svchost running on my computer?,Tech Support: 2 home\/student 2010 free trials downloaded, can one be uninstalled?,IE 8: Can't Send Page by Email AND Can't Send Link by Email,I can't connect to yahoo.com for online gaming after installing ex9 is there a problem?,c drive says full with 58gb and drive d has 219gb how to fromat drive c for more gb,Automatic Spelling Correction in MS Excel 2007,Attempting to install a financial program and getting error with regsvr32

No comments:

Post a Comment