> I suppose you can Enabled = No and set the Locked = Yes to the fields
but the one field you want to scroll on.
That's not a bad idea. However, that is not really what I am looking
for. I am using the datasheet for display only. No update is needed
for the data. I want the user to be able to scroll through the
records and stop on the record they want to select...possibly have a
double-click event that allows them to process a record, or have a
button to process the record selected.
I was able to do it successfully by using the following code within
the datasheet form:
Private Sub Form_Current()
On Error Resume Next
Form.SelLeft = 1
Form.SelWidth = 99
Err.Number = 0
End Sub
However, I had to add the "On Error Resume Next" and "Err.Number = 0"
because it would generate errors if the datasheet didn't have focus
(i.e.: I have multiple datasheets on my main form housed in a tab
control). Even when the errors are generated, it still does what I
want.
So, I got it to work. Would anyone know a better way?