I want to use a form button to automatic create a new data record,
need to use this format in the table field...
date + three digit serial no...
everyday from 20170110-001 to 20170110-999
you really shouldnt do it this way. Instead just create a Date/time field set for General date. (both date and time stamp) This eliminates the need for code and does the exact same affect.
BUT, if you want the code version:
turn on the toobar wizard,
grab a button from toolbar, place on form,
select the action, ADD NEW RECORD
button will create
select button, property events, on click event
click the ellipsis button on the on click event
view the code that adds new record,
after the 'add new code' add code to create the serial no.