I got forms made, so you can edit data in tables. But some fields have numeric data. How can I stop them from putting anything other then numeric? Thanks :D
We don't want letters in numeric fields :p
downhill
04-16-03, 10:38 PM
High light the fields you what only numeric data. Then Format/Cells/Number tab and pick what kind of data you want formated....
There may be a better way as this isn't idiot proof....
Wrong form, sorry :o
Are you thinking of excel downhill? :confused:
downhill
04-16-03, 11:10 PM
Originally posted by CoolJ
Wrong form, sorry :o
Are you thinking of excel downhill? :confused:
Opps...sorry I am. :o
Acess is not something I'm that familiar with, sorry.
Let me do a little research...
downhill
04-16-03, 11:20 PM
Looks like you need to create an input mask? A guess....
From the help file...
Validate or restrict data in a form
By validating or restricting data, you can give users immediate feedback about the data just entered and ensure that they get the correct information into a text box or other control (control: A graphical user interface object, such as a text box, check box, scroll bar, or command button, that lets users control the program. You use controls to display data or choices, perform an action, or make the user interface easier to read.)on a form. You can create an input mask or a validation rule for a control that accepts data from users. To prevent a user from entering data, you can lock a control.
Create an input mask for a control
Open a form in Design view.
Select a text box or a combo box, and then click Properties on the toolbar to open the control's property sheet.
In the InputMask property box, do one of the following:
Type the input mask definition.
In a Microsoft Access database (.mdb), click the Build button in the InputMask property box to start the Input Mask Wizard, and then follow the instructions in the wizard dialog boxes.
Create a validation rule for a control
Open a form in Design view.
Select a control, and then click Properties on the toolbar to open the control's property sheet.
In the ValidationRule property box, do one of the following:
Type the validation rule.
In a Microsoft Access database (.mdb), click the Build button to use the Expression Builder to create the validation rule.
In the ValidationText property box, type the error message that you want displayed if the text entered violates the validation rule.
Note In an Access database, if you set the ValidationRule property for the field in table Design view and also set the ValidationRule property for a control bound to that field, Access enforces both rules — the control validation rule doesn't override the field validation rule.
Lock or disable a control
Open a form, report, or data access page in Design view.
Make sure that the control is selected, and then click Properties on the Form Design, Report Design, or Page Design toolbar to open its property sheet.
In a form or report, do one of the following:
If you want to disable the control completely so that it's dimmed and can't receive the focus, set the Enabled property to No.
If you want to make data in the control readable, but not allow users to change the data, set the Locked property to Yes. If you set the Enabled property to No and the Locked property to Yes, the control won't appear dimmed, but it won't be able to receive the focus.
In a data access page, to disable the control completely so that it's dimmed and can't receive the focus, set the Disabled property to True.
Tip
In a form or report, you can use the Enabled property together with the AfterUpdate property to disable a control until a user enters text or makes a selection in another control. For example, you might want to disable a command button until data has been entered in a text box. You can use the AfterUpdate property of the text box to call an event procedure or a macro to enable the command button.
Notes
If you need more room to type in a property box, press SHIFT+F2 to open the Zoom box.
Microsoft Access validates a field when you change data and try to leave the field, save the record, switch views, or close the form.
=========================================
Input Mask...
About creating input masks to control how data is entered in a field or control
You can use the InputMask property to create an input mask (sometimes called a "field template") that uses literal display characters to control how data is entered in a field or control. For example, the following input mask requires that all phone number entries contain exactly enough digits to make up a U.S. area code and telephone number, and that only numbers can be entered in each blank. You just fill in the blanks.
An input mask is used in fields (in tables and queries) and in text boxes and combo boxes (in forms) to format data and provide some control over what values can be entered. The InputMask property setting consists of literal characters (such as spaces, dots, dashes, and parentheses) along with special characters that determine the kind of value that can be entered into the blank in that position. Input masks are primarily used in Text and Date/Time fields, but can also be used in Number or Currency fields.
You can set the InputMask property in Design view of a table, query, or form. In most cases, you'll want to set the property for the field in table Design view. This way, the input mask is automatically applied to the field in query Design view and to controls on a form or report bound to that field (as long as you create the control after setting the property in table Design view). In certain cases, however, you may want to set the property in query Design view or form Design view. For example, you might want to omit the input mask in a table but include it in a text box. Also, if you're using an unbound control, you'll need to set the InputMask property in form Design view.
Choosing between using an input mask and a display format
Microsoft Access provides two field properties that produce similar results: the Format property and the InputMask property.
Use the Format property to display data in a consistent format. For example, if you set the Format property for a Date/Time field to Medium Date format, all dates entered will display in this form: 12-Jan-1999. If a user of your database enters a date as 01/12/99 (or any other valid date format), Microsoft Access will convert the display to the Medium Date format when the record is saved.
The Format property affects only how a value is displayed, not how it is stored in the table. Also, a display format isn't applied until the data entered is saved — nothing is displayed in the field to suggest or control the format in which data is entered. If you want data to display exactly as entered, don't set the Format property. If you need to control how data is entered, use an input mask in addition to, or instead of, a data display format. An input mask ensures that the data will fit in the format you define, and you can specify the kind of values that can be entered.
If you define both a display format and an input mask for a field, Microsoft Access uses the input mask when you are adding or editing data, and the Format setting determines how the data is displayed when the record is saved. When using both Format and InputMask properties, be careful that their results don't conflict.
Thanks Downhill! I'll give it a try.
Is that from the help in access? I :rtfm: and didn't see that.
Thanks again for the help :)
downhill
04-16-03, 11:33 PM
I have a bit of help as I have a couple of books on Office. :)
Yes if you type input mask into the help file you'll probably find what you need though. :)
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.