New Record Insert

J

JimS

I have a form bound to a table in A2003. When the user wants to insert a new
record, I want to set one of the fields to a certain number (similar to
autonumber). I tried setting it in the Before_Insert event, but the event's
not fired until the user types in the first character of the first field.
Well, this is the first field, and the user may override my choice if he
wants. I want the new record to appear with the contents of the first text
box set programmatically, then have the second field get focus, so the user
would not normally even type into it.

I guess I could set the focus on the second field and wait until the user
starts typing, but is there a way to not wait?
 
B

Beetle

Try setting the Default Value property of that control by whatever means
you are currently using to arrive at your desired number. Also, set that
controls
Tab Stop property to No.
 
J

JimS

Nice idea. Worked Perfectly. The value is a complex domain aggregate
function, but for the once-per-add situation, it's fast enough. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top