KeithWilliams
Registered User.
- Local time
- Today, 11:25
- Joined
- Feb 9, 2004
- Messages
- 137
Hi,
I have the following code in my form's open event:
Me!Calc_Actual.SetFocus
Me!Calc_Actual.SelLength = 0
This code has no effect. I want to avoid the field that initially gets focus from being highlighted (but it needs to be enabled and locked). The field already gets focus by default, I just coded the SetFocus because the MS Help says the field must have focus in order to use SelLength.
I wonder if the Open event is too early for this to work. Can I "post" an action to the form?
I also tried putting the code in the form's Load event but that doesn't seem to fire (I put a debug stop in the event and it does not stop there). I can't explain this. I've also tried setting Behaviour Entering Field = Go To Start Of Field (instead of Select Entire Field) in the Tools>Options of Access, but this has no effect.
Thanks,
Keith.
I have the following code in my form's open event:
Me!Calc_Actual.SetFocus
Me!Calc_Actual.SelLength = 0
This code has no effect. I want to avoid the field that initially gets focus from being highlighted (but it needs to be enabled and locked). The field already gets focus by default, I just coded the SetFocus because the MS Help says the field must have focus in order to use SelLength.
I wonder if the Open event is too early for this to work. Can I "post" an action to the form?
I also tried putting the code in the form's Load event but that doesn't seem to fire (I put a debug stop in the event and it does not stop there). I can't explain this. I've also tried setting Behaviour Entering Field = Go To Start Of Field (instead of Select Entire Field) in the Tools>Options of Access, but this has no effect.
Thanks,
Keith.