How do I set the focus for a field after new (blank) record ?

Hi

When I click the "new (blank) record" icon at the bottom of a form,
the cursor disappears.  How can I make the cursor go to the first
field on the form like it does when I first go to the form.

Thanks in advance
Mark Thornblad
0
mthornblad
11/16/2007 4:24:49 AM
access.forms 6864 articles. 2 followers. Follow

4 Replies
1609 Views

Similar Articles

[PageSpeed] 37

Use the form's Current event to run a macro that contains the GoToControl 
action, and use that to set the focus to the desired field.

-- 

        Ken Snell
<MS ACCESS MVP>


<mthornblad@gmail.com> wrote in message 
news:d7aa0f3c-adbc-4f30-8e2b-f82b121f5876@a28g2000hsc.googlegroups.com...
> Hi
>
> When I click the "new (blank) record" icon at the bottom of a form,
> the cursor disappears.  How can I make the cursor go to the first
> field on the form like it does when I first go to the form.
>
> Thanks in advance
> Mark Thornblad 


0
Ken
11/16/2007 5:00:08 AM
Use the Current event procedure of the form to SetFocus to the field you 
want, if it is at a new record.

Example:

Private Sub Form_Current()
    If Me.NewRecord Then
        Me.[SomeControlNameHere].SetFocus
    End If
End Sub

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

<mthornblad@gmail.com> wrote in message
news:d7aa0f3c-adbc-4f30-8e2b-f82b121f5876@a28g2000hsc.googlegroups.com...
> Hi
>
> When I click the "new (blank) record" icon at the bottom of a form,
> the cursor disappears.  How can I make the cursor go to the first
> field on the form like it does when I first go to the form.
>
> Thanks in advance
> Mark Thornblad 

0
Allen
11/16/2007 5:00:18 AM
On Nov 15, 11:00 pm, "Ken Snell \(MVP\)"
<kthsneisll...@ncoomcastt.renaetl> wrote:
> Use the form's Current event to run a macro that contains the GoToControl
> action, and use that to set the focus to the desired field.
>
> --
>
>         Ken Snell
> <MS ACCESS MVP>
>
> <mthornb...@gmail.com> wrote in message
>
> news:d7aa0f3c-adbc-4f30-8e2b-f82b121f5876@a28g2000hsc.googlegroups.com...
>
> > Hi
>
> > When I click the "new (blank) record" icon at the bottom of a form,
> > the cursor disappears.  How can I make the cursor go to the first
> > field on the form like it does when I first go to the form.
>
> > Thanks in advance
> > Mark Thornblad

Thanks so much Ken
I really appreciate your help.  Just what I needed.
I have another question about a form/subform which I will make a new
post.

Thank again
Mark
0
mthornblad
11/16/2007 5:19:41 AM
On Nov 15, 11:00 pm, "Allen Browne" <AllenBro...@SeeSig.Invalid>
wrote:
> Use the Current event procedure of the form to SetFocus to the field you
> want, if it is at a new record.
>
> Example:
>
> Private Sub Form_Current()
>     If Me.NewRecord Then
>         Me.[SomeControlNameHere].SetFocus
>     End If
> End Sub
>
> --
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users -http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> <mthornb...@gmail.com> wrote in message
>
> news:d7aa0f3c-adbc-4f30-8e2b-f82b121f5876@a28g2000hsc.googlegroups.com...
>
> > Hi
>
> > When I click the "new (blank) record" icon at the bottom of a form,
> > the cursor disappears.  How can I make the cursor go to the first
> > field on the form like it does when I first go to the form.
>
> > Thanks in advance
> > Mark Thornblad

Thank you also Allen.
0
mthornblad
11/16/2007 5:21:14 AM
Reply:

Similar Artilces:

Creating a new field based on conditions
I have a database that tracks insurance information for our various vendors. Each insurance type has 2 fields - a requirement field (yes/no), and an effective field (some show an expiration date, some are yes/no). I have created a query that will return only the records for which insurance is required but is expired/missing. My problem is that I want to create a new field that is calculated based on the values in the other two fields in order to make the resulting report more user-friendly. For example, if GLRequired is True and GLExpiration is <Now(), I want the new field to say...

parsing a date and time field #2
I am having trouble parsing the date and time in a field. I download data from a data base and the date and time come together in one field. I want to seperate the two. The date and time comes across as the following: "2/1/2009 14:37" in the cell. When I parse it, it seperates into three columns as follows: "2/1/2009", 2:37 AM", and "PM" I can see what is going on but I would like to get two columns with one as the date and the other as the correct time. are they any ideas on how to address this? Try using the TimeValue and DateValue functions. First format ...

Having problem of Outlook not receiving new e-mails
I have been using Outlook for over 1 year with Comcast Broadband. Suddenly last week, I received a message that Outlook 2000 was experiencing a problem when receiving new e-mails and was going to shut down. I re-opened Outlook and it looked different and then it asked for me set up a profile and I canceled it. But after that window coming up a couple of times after it shut down, I decided to put in a new name and then I could not get to my old e-mails and it acted like a new set up. Then I really got frustrated. I was eventaully able to get back to my old e-mails and have been able t...

how to set the worksheet direction in Excel XP
in a right-to-left interface the vertical side showing the row numbers of the excel worksheet appears on the right side of the sheet. how do I change it' to appear on the left side? Hi does tools / options / international - default direction ... help? Cheers JulieD "inbal" <inbal@discussions.microsoft.com> wrote in message news:CC3B0D65-78B2-4B5B-A6B2-789773203853@microsoft.com... > in a right-to-left interface the vertical side showing the row numbers of > the > excel worksheet appears on the right side of the sheet. how do I change > it' > to a...

Set a range from a variable location
I am using a loop function that will eventually select and activate a specific cell known as "TheCurrentCell." Once I reach that location I want to use that coordinate as the upper left area of a new range. Supposing that the end cell of my range is D1000, the Range selection would be something like Range(TheCurrentCell:D1000).select, however, I don't know the correct syntax to make this happen. Please help. Thank you. Use something like Range(Selection.Address & ":D1000").Select. "Troubled User" wrote: > I am using a loop function that will...

Money: Err Msg: Path Has Not Been Properly Set Up
please help.... Microsoft Money. The path is not properly set up in the registry or has been moved after running Money's Setup. Please re-install Money. Otherwise, Money may not be able to run properly. re-instal wont help deleting registry entry dasn.t help. windowx xp sp2 Ms Money 97 (v.5.0) .. Are you using an administrator account to run the software? -- Glyn Simpson, Microsoft MVP - Money http://money.mvps.org Check http://support.microsoft.com/default.aspx?scid=fh;EN-GB;mny for UK tips and fixes for MS Money. To send Microsoft your wishes or suggestions, use http://registe...

Yet another duplicate record dilemma
I have a table with records where one field are duplicates. I'm able to query to find duplicates and delete them, however what I need to do is find the duplicates, produce a total from another field, delete the duplicates and update the record field with the new total. Use the Find duplicates wizard, the build an Update query and either add to the field: Update MyTable Inner Join Querty1.ID On MyTable.ID Set MyField = MyField + Query1.MyField or just update it: Update MyTable Inner Join Querty1.ID On MyTable.ID Set MyField = Query1.MyField Then delete the duplicate data. -- Ar...

How to make a Add key disabled after adding one record unless
Hi, I have a form where I am adding records. There are two boxes where one has to put the lineitemnumber and another box where one has to put the description. Unless the above two boxes are filled in the Add command box need to be disabled. Now, the problem is after adding one record the Add button is enabled and I cannot disable it. I would appreciate any help to solve this. The error message is: The methos is not supported The following is the code: Private Sub cmdadd_Click() On Error GoTo Err_cmdadd_Click If (IsNull(Me.LineItemID) = True) Or (IsNull(Me.Description) = True) Then ...

"x" button enables deletion.... can we put a focus trigger there?
Hi, on three forms, I put focus triggers on the "delete" button because I need to validate some additional data before allowing the user to delete. However, if the user clicks on the corner "x" button to close the form and gets the dialogue box saying they have changes, do they want to "Save", "Delete" or "Cancel", they can delete the record anyways. Is there any way to put a focus trigger on the button of the dialogue box, or on the "x" button? Thanks in advance. I assume you are working with Dexterity. To work with an add...

Extract text from field
If you have a filed that contatins the following data:LastName, FirstNameWhere LastName has varing lengths. Can you run an update query to obtain just the LastName part of the field? If so, what would be the command?Many, many thanks in advance. On Tue, 6 Mar 2007 14:09:45 -0500, "Mary M" <none@no_email.com> wrote:>If you have a filed that contatins the following data:>>LastName, FirstName>>Where LastName has varing lengths. Can you run an update query to obtain >just the LastName part of the field? If so, what would be the command?>>Many, many thanks in...

Add new record through Form view
I have a table which is linked to a form, i would like to have a command button which will add a new record to my table. On the click of command button it should view the last empty row of my table in a form. On Sat, 26 Dec 2009 11:11:01 -0800, Ranjith Kurian <RanjithKurian@discussions.microsoft.com> wrote: >I have a table which is linked to a form, i would like to have a command >button which will add a new record to my table. >On the click of command button it should view the last empty row of my table >in a form. The Click event should show [Event Proced...

Setting up my work outlook account at home
I do not know how to set-up my outlook at home to check and receive email at home. This is really a question for your Mail Administrator. This depends on what ISP is used for work or if you use the Exchange Server. Then there may be a domain access issue. -- Nikki Peterson [MVP - Outlook] "Liz" <anonymous@discussions.microsoft.com> wrote in message news:049a01c39db2$d8df2cb0$a501280a@phx.gbl... I do not know how to set-up my outlook at home to check and receive email at home. ...

Querying multiple records in two tables
Hi, in my database I have tables for users (UserID, UserName), projects (ProjectID, Project Name), and qualifications (QualID, QualName). I have join tables for users_qualifications (UserID, QualID), and projects_qualifications. (ProjectID, QualID). What I need to do is run a query for a project to show which users have the exact matching qualificiations. Users can have many qualifications, projects can require many qualifications, users may only work on a project if the qualifications required/held match exactly. Please help. Assuming that ProjID, and QualID are numeric, the following sho...

Send out blank reply
Recently, after receiving a message, my Outlook 2000 is sending out a blank reply message to the sender automatically. Would this cause by setting or virus? ...

Set default address book automatically (registry)
I know I have done this before a few years back in another site - but I cant remember how. We need to set the default lookup address book for all our 2000+ OL2k3 users and to use a specific lookup order. I know they could each do this manually but we have 2000+ users and the support overhead would be huge. We dont want to users to use the GAL as their default lookup (which it is out of the box) because it contains lost of confusing system addresses and duplicate names for the same person in different security level networks; which the users find VERY confusing to distinguish between). We wan...

How to set dependencies on project
Hello all, I have created a separate build on an existing project and copied settings from the existing project (Build->Configurations->Add). When I build the new project, it does not pickup any of the dependencies from sub-projects (ie I get link errors for all of them). Can someone tell me where to set these for the new project? The Project->Dependencies dialog list all dependencies for the project and are checked. Thanks mike wrote: > Hello all, > I have created a separate build on an existing project and copied settings > from the existing project (Build->Con...

reading and displaying memo fields
I got an ODBC database with a memo field. Now I use a CRecordSet in VC6 to read the database with CLongBinary for the memo field. After reading 18 fields he's out of memory. Is there a way to use CString instead of CLongBinary, cause it's only text in the memo fields (I already tried, but then I get an error message that the database could not be read)? Or is there a way to read all other fields first and only read the memo field when the user choose a specific item in the database? Thank you for helping me! ...

IM error ADO field is nothing
I am trying to do an import for manual payroll checks. I have used the same set up as is used in the sample but I recieve the above error. It also says 0 integrations failed. I can't find anything in knowledgebase. Thanks for any help. Tracey D Open IM, select your integration, double-click on Mappings. Click on the Transactions collection, then click on the Options tab. You will want to make sure the Record Source option rule is set to Use Source Recordset and that the Source is set to your source query. If the above is defined properly, then you will want to make sure you a...

Reminder Time vs Due By Field
I'm using O2003. For a contact, there is the Due by Field. There is also a Reminder Time field. If you update the Due By field, it updates the Reminder Time field. However, if you update the Reminder Time field, it does not update the Due By field. By default for a contact, you have access to the Due By field. The Reminder field is avaialble, but you have to manually add it. In Tasks, it seems to work the same in that if you update the Due By field, it updates the Reminder Time field. However, if you update the Reminder Time field, it does not update the Due By field. However, you have a...

Only new email window?
Is there a way that I could have a shortcut on my desktop that does not open the whole application, but rather ONLY open my new email window? I send out a lot of email, and I also have a lot of other apps running. Please let me know if that is possible. Thank you, Steve Steve F. <sf@flintind.com> wrote: > Is there a way that I could have a shortcut on my desktop that does > not open the whole application, but rather ONLY open my new email > window? I send out a lot of email, and I also have a lot of other > apps running. Create a shortcut whose target is: "%Pr...

Report Filter focus
Hey all, I am experiencing an issue with the report filters in RMS. It is not a show stopper, but annoying. When I launch a report in SO Manager on a win XP machine, RMS version 1.3, the report filter is there, but the correct field is not selected and the filter under Filters is not selected. When this happens and I want to change the filter, I first need to click on the Filter itself in the bottom box and then select the correct field out of the Fields list, then change the Value. Is there anything I can do to fix this? To use a real report as an example, When I run the Detailed Sales rep...

Field mapping for Appointments in filtered views
I’ve been looking at this for ages but cannot find the field for Contact for an Appointment in the filtered views. Regarding is dbo_FilteredAppointment.regardingobjectidname and is also in dbo_FilteredActivityPointer.regardingobjectidname with a foreign key of dbo_FilteredAppointment.activityid Optional seems to come from dbo_FilteredActivityParty.partyidname with a foreign key of dbo_FilteredAppointment.activityid Does any one know where the Contact for the Appointment get stored? Also a link to a ER diagram for 3.0 or a mapping resource would help me from unnecessary trawling throu...

Newbie needs help with new Exchange 2003 installation
I am TOTALLY new to Exchange. We just installed Exchange Server 2003 on a Windows 2003 domain. I have one (test) account set up and it appears to work OK but I keep getting an error message that says "Task "Microsoft Exchange Server" reported error (0x8004010F): 'The operation failed. An object could not be found.' I know, I know...How could I possibly not understand THIS message? I appear to be getting mail but I' can't be sure. How can I check to see what's causing this (and more important...what object it's looking for?) Thanks for any help! -Fran- ...

Easy way to copy fields?
I have made a lot of customizations to the Leads form by adding a lot of fields. Now I want to add most of those fields to the Contacts form so that when I promote a Lead the info carries forward. Is there an easy way to copy and then link these fields or do I have to manually create them all all over again as Contact fields and then link them? You need to create the exact same fields in contacts then create mappings betweek leads and contacts in the deployment manager-schema manager. Have a look at the tool and see if it makes sense. As always I recommend you test this out on your tes...

Cursor on new message window but no text appears when typed?
When using Outlook 2003 for sending new e-mail, I'm unable to type text into the message body. The cursor appears but no text shows. Text appears when I use Word 2003 to send my new e-mail message. It is more convenient for me to use Outlook. Help. ...