Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 20th, 2005, 02:59 PM
Authorized User
 
Join Date: Apr 2005
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default Force cursor to next field

Hi all,

Thank you for your previous help. I am learning more all the time. (PS, I have not taken any classes on Access, so I turn to this forum for help)

I have created a form for entering jobs into our database. All of the fields are “Locked” “On Current” if there is not a “TWOrderNumber” present.

If IsNull(TWOrderNumber)
        Me.Customer.Locked = True
        Me.PartNumber.Locked = True
        SoOnAndSoForth
    Else
        Me.Customer.Locked = False
        Me.PartNumber.Locked = False
        SoOnAndSoForth
    End If

End Sub

I have locked the fields to prevent data entry until the “New Work Order” command button is clicked. When the “New Work Order” button is clicked, a “TWOrderNumber” is generated and all of the data entry fields are unlocked.

I would also like to write the code to make the cursor go to the “Customer” text box when the command button “New Work Order” is clicked. The “Customer” text box is tab stop – 2 on the form. The “Customer” field would be the 1st field data will be entered in.

Thanks in advance for any help.


D. Bartelt
__________________
D. Bartelt
 
Old June 20th, 2005, 03:21 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Use the .SetFocus method, i.e.

Me.Customer.SetFocus

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old June 21st, 2005, 08:37 AM
Authorized User
 
Join Date: Apr 2005
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Mr. Serrano,

Thank you for your response. That was easy. I appreciate your help. My family and I will be vacationing near Traverse City beginning July 02, 2005. Love Michigan

Have a good day!

Don Bartelt

D. Bartelt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Move cursor to beginning of field in form Odeh Naber Access 3 June 5th, 2007 04:21 PM
add a new row when cursor comes to the last field bullsb Classic ASP Professional 8 March 11th, 2007 04:11 PM
add a new row when cursor comes to the last field bullsb Javascript How-To 2 February 26th, 2007 11:26 PM
How can i force a field being created in a map jtf Biztalk 0 July 30th, 2005 03:06 AM
position cursor at certain field on user form kliu9 Excel VBA 1 January 21st, 2005 06:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.