May 28, 200124 yr I'm making a db in which video editors can log video according to time-code, which is in the format HH:MM:SS;FF (hours, secs, mins, frames.) How can I force their entry into that format without requiring them to enter anything other than numbers? I'd like to keep the whole entry as one field - that's where I'm having a problem
May 28, 200124 yr Assuming that the format to be typed in is HHMMSSFF, with leading zeros, so that it woulc be entered 02013460 for something 2 hours, 1 minute and 34 seconds long with 60 frames, and assuming that the frames is never more than 99, here's what you do. Create a field called Time_Code_Entry. This is the field that they actually enter the time code into. Then create another field called Time_Code_Formatted which is set to be a text calculation like this: Left( Time_Code_Entry, 2 ) & ":" & Middle( Time_Code_Entry, 3, 2 ) & ":" & Middle( Time_Code_Entry, 5, 2 ) & ";" & Right( Time_Code_Entry, 2 ) Then place the Time_Code_Formatted field exactly on top of the Time_Code_Entry field on the layout. Set the fill of Time_Code_Formatted to white and make it so that the user can't enter the field with the Field Format options. Make the Time_Code_Entry field enterable. This way, when the user clicks on the Time_Code_Formatted field, since they can't enter that field, it taks them to the field below it, which is Time_Code_Entry. Here they see the raw numbers. When they exit the record by hitting enter, the raw numbers disappear because the Time_Code_Formatted field is on top and has a white fill color. If the assumptions I've made above are not all true, let me know where I'm off and I can correct the calculation for you. Chuck
September 19, 200223 yr I've done this by using four different fields: tc_hrs, tc_mins, tc_sec, tc_frms I then use a Calculated field to concatenate with ":" for display purposes. Using the seperate fields allows me to perform calculations much better; e.g. duration of clip. Hope this helps. Garry
Create an account or sign in to comment