The question is not clear at all. What part of the date field would "19" occupy? Surely not the first two digits if a four digit year since we are now in the 21st century.
Sorry, it's a baseball card database in which all dates begin with 19. I'd like to tab to the field, have the 19 there and be able to type in the last two digits without the 19 being deleted. I suppose I coud just us the last two only but I would prefer the complete date. Thanks.
Why don't you just have a trigger script that sets your field to 19 when you click on it? (go to format/set trigger script, chose your best option ie on click or on enter, and have a small script with the "set field" instruction
Thanks- sounds like that would work but I need more detail about making the script. Got to the scripts box but didn't know where to go from there...
I managed to make the script but even though "select entire contents..." is unchecked, the field is selected whe I tab to it and therefore deletes the 19 when I type unless I use the right arrow key first. Any way to fix that? Thanks again!
much easier than that
- in layout mode, select the field you want pre-filled
- go to the format menu and at the end select "set script triggers"
- I'd check the onobject enter box
- select script button
then create a new script (name it whatever)
- on the left find the "set field" instruction
specify the field (first button) and what you want to fill it with (19) (second button) and that should make the trick (just tested it)
Make sure "select entire contents" is not checked in the inspector
Can't see why it would be selected
tried checking & un checking the box
hope it helps
I've tried checking and unchecking it and it always selects the contents anyway...
Use a script trigger . . . OnObjectExit perhaps, and set up a script with SetField with the calc being "19"& Self. When you enter the field, simply enter the last 2digits of the date and tab out. The field should then fill , if you type in 38 for example, with "1938".
Thanks but I can't figure out the calc- wrote "19"& Self, 19&Self, 19 Self, etc.- won't accept them.
You don't need a script.
Go to Manage...Database
Go to the field in question, click on Options
Select the Auto-Entry panel if it isn't already selected
Go to Data: In the box type in 19
Make sure the select entire contents is NOT selected in the inspector.
Now when a new record is created the field in question will have a 19 entered and the cursor will be after the nine when you tab into it.
The field won't attempt to validate a date until you add another character to it.
Many thanks to all you guys- Bumper's method worked and it was elegant and simple. You are all great! I'm still learning and appreciate the help.