Selecting Whole Field

Crackers

Registered User.
Local time
Tomorrow, 08:14
Joined
May 31, 2002
Messages
36
I have text boxes on a Form that I need to update with figures each week.
I have tried to have the entire field selected by right clicking with the mouse but I keep getting an error.
The coding I am using in the 'OnClick event' is:

Private Sub Ctl1_Click()
Me!R1.SelStart = 0
Me!R1.SelLength = Len(Me!R1)
End Sub

R1 being the txtName.

The errors I have received are Object doesn't support this property or method.
I have tried to replace the Ctl1 with R1 but still get errors.
Can anyone please shed some light on what I am doing wrong.
I am using Access 2002.
 
You may be able to do what you want from the Tools->Options menu...
 
You can use the SetFocus command if all you want to do is select the value of a field.

Code:
Me.tbNewRecordDate.SetFocus

If you need to update the values of a field on a weekly basis then you need to use an update query and work on how to incorporate your criteria into your weekly function.
 

Users who are viewing this thread

Back
Top Bottom