A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to set the default field on a form



 
 
Thread Tools Display Modes
  #1  
Old September 26th, 2008, 06:00 PM posted to microsoft.public.access.tablesdbdesign
Rob Drummond, Jr
external usenet poster
 
Posts: 1
Default How to set the default field on a form

I am creating a data entry form. I would like to have the cursor
automatically appear in the first field on the form when the "New Record"
button is clicked. How do a set a field as the default or tell the
form/database where to put the cursor when a new record is being created?
  #2  
Old September 26th, 2008, 07:33 PM posted to microsoft.public.access.tablesdbdesign
fredg
external usenet poster
 
Posts: 4,386
Default How to set the default field on a form

On Fri, 26 Sep 2008 10:00:01 -0700, Rob Drummond, Jr wrote:

I am creating a data entry form. I would like to have the cursor
automatically appear in the first field on the form when the "New Record"
button is clicked. How do a set a field as the default or tell the
form/database where to put the cursor when a new record is being created?



1 Code the Form's Current event:
Me.[TheControlName].SetFocus

This will set focus to that control each time you navigate to another
record.

2) If you ONLY wish to do this for a new record entry, then code the
Current event:
If Me.NewRecord Then
Me.TheControlName.SetFocus
End If


--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.