Jump to content
Server Maintenance This Week. ×

Automatic slashes for rookie


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

Recommended Posts

Hi Robbo,

If your field is defined to be a date type field you are halfway there. Then just right click on the field and you will see a choice called Format Date. From there it's pretty intuitive.

Link to comment
Share on other sites

Ted,

Thanks for the response.

What happens when I define the field as "Date" and use the date format choice, is that it expects me to type in "12/03/1999" and when I tab out of the field it will type in "12/03/99".

That's what I want to end up with in the field but I only want to type "120399" I want to have the slashes typed in for me.

Thanks,

R

Link to comment
Share on other sites

The field cannot be a date. It will have to be text. Use an auto-enter calculation, with 'do not replace existing value' deselected, of

Left( textfield; 2 ) & "/" & Middle( textfield; 3; 2 ) & "/" & Right( textfield; 2 )

Then create a calculation field with a date result equal to GetAsDate(textfield). Use this field for searches, etc.

If you stack the two fields, formatting the date field to only allow entry in Find Mode and the text field to only allow entry in Browse Mode, you'll get the best of both worlds.

Link to comment
Share on other sites

I meant stacking as it putting one field on top of the other. Select a field in Layout Mode and go to Format -> Field Behavior, to set the entry options for Browse and Find modes.

Yes, Slobey, there is. But you would have to define the rules for what is acceptable and add those in a Case calculation. You have to be careful, though, because 122005 could as easily be 12/20/05. Because of this, it's more reliable to allow only one type of entry.

Link to comment
Share on other sites

Slobey,

If you are just trying to keep the key strokes to a minimum this suggestion won't help but if you enter 12.20.05 (using decimal points) your hand movement can be confined to the primary keys on the keypad.

Just another thought.

Link to comment
Share on other sites

This topic is 7013 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.