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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excluding a text box and setting the cursor position in a form 2

Status
Not open for further replies.

Mayhem9

Technical User
Dec 19, 2009
155
AU
Hello,

I apologize for asking such basic questions. I have not been able to find a solution. Perhaps it is a matter of terminology.

I have 2 questions:

1.) Is it possible to exclude a textbox from being written to and remove it from the tab (so that you don't go there at all).

2.) When you go to a new record in a form, it is possible to set the cursor, so it appears in the first field that requires input?

Cheers,
Darren
 
1.) Is it possible to exclude a textbox from being written to and remove it from the tab (so that you don't go there at all).
look @ Locked ,enabled
2.) When you go to a new record in a form, it is possible to set the cursor, so it appears in the first field that requires input?
look @ tab Stop, Tab Index
 
Thanks pwise,

I have tried that. Setting the textboxes to locked has not prevented them from being accessible and overwritten.

Also, when I look at the tab settings, all I am able to do is rearrange the sequence. I do not see how to exclude them. If I leave the field blank, an error box pops up telling me I cannot do that.

I am using Access 2003 in XP (SP3).
 
You can still write when the control is locked or not enabled???

Set tab stop to no and the cursor will not stop there
 
My mistake, whilst the cursor shows in the textbox, the contents is locked against editing. I am having problems with finding how to set the tab value to No. In the properties, it will only allow me to set a numerical value. I tried 0 but that just sets it as the start position. If I go to Tab Options, all I can do it sort the order of the tab positions. I cannot se anything that will allow me to exclude the textboxes. Am I looking in the wrong place?
 
I need some sleep - I didn’t even see “Tab Stop”, despite it sitting directly above “Tab Index”! Sorry for wasting your time pwise and thank you for your help and patience. It is all sorted now.
 

The Tab Order will not insure that on entering a new record the focus goes to the first control! The focus will go to whatever control had focus on the previous record!

To insure that it goes to a given control when entering a new record, use

Code:
Private Sub Form_Current()
 If Me.NewRecord Then FirstControlName.SetFocus
End Sub

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Thanks Missinglinq,

Works perfectly!
 

Glad we could help!

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top