Jump to content

Controlling how data is entered in a field


This topic is 8281 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Is there something similar to the Access "input mask" in FM??

I have a date field, and would like to display dd/mm/yyyy while the field is null or empty but enable the user to type a date without the need to type the " - " or the " / ".

Microsoft Access has something called input mask(to control how data is entered and stored)which is different then field format(to control how data is displayed), is there such a thing in FM

Thanks for the help

--Dan

Link to comment
Share on other sites

There are 3 ways to accomplish what you want to do.

The first is to simply format the display of the data on the layout. For most date, times and numbers this is fine. Select the field on the layout, goto the Format menu and you will see the various options.

The second is to define a calculation field as a format mask for the field. This is a good option for things like phone numbers. An example might be: Left(Number, 3) & ")" & " " & Middle(Number, 4, 3) & "-" & Middle(Number, 7, 4), Number ). This will take a number like 1234567890 and format is as (123) 456-7890, now you can use this formatted number on your layouts and reports. I also have a really complex version which will strip out all characters other than numbers and format it as above.

The final and most complex option uses a set of fields to actually reformt the data entry to be in the correct format. It will actually take the data that was entered and turn it into the specified format. I have personally never encounted the need for this. See John Mark Osbourne's databasepros website for this trick.

Link to comment
Share on other sites

This topic is 8281 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.