Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding new record to datasheet

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

I would like to improve a form I'm using. Currently I have a command button on a form that inserts a new record into a table (keyfield value = "-"), then refreshes a subform (datasheet) so the new record ("-") can be seen.

The user then has to click in that field, press the backspace key to delete the "-" and then start typing.

What I would like is for the focus to automatically move to the datasheet and allow the user to begin typing.

I hope this makes sense. If anyone can help me it would be greatly appreciated.

Thanks
 
I may be missing something, but why not just have your command button create a new record in the subform and set the focus to the new record row. To ensure that the user enters a primary key value, just use a error dialog in the subform BeforeUpdate event informing them that this is a required field.

PaulBasel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top