Greetings,
This is a problem that has been plaguing me for months. Tonight I thought I had it. It worked in AccessXP fine until I compacted the database, then the same old problem.
I have a main form with a subform set to Continuous Forms. It is populated by a query but is not related to the main form.
When the main form is opened, the record selected in the subform is highlighted. I want it not to be highlighted but have the cursor blinking on the left side of the text.
From the google newsgroups I found some code that worked at first, but as noted above, could not withstand the compaction/repair. I got no errors, it just stopped working!
Here is the code at the end of the OnOpen event of the form. I also tried it in the OnCurrent and in both but to no avail.
Forms![frmEnter_Tasks]![subfrmEnter_Tasks].SetFocus
Forms![frmEnter_Tasks]![subfrmEnter_Tasks]![txtTaskName].SetFocus
SendKeys "{F2}"
SendKeys "{HOME}"
I am simply blown away that this could work for a while and then abjectly, totally fail. Any advice will be most appreciated.
Regards, Sorrells
This is a problem that has been plaguing me for months. Tonight I thought I had it. It worked in AccessXP fine until I compacted the database, then the same old problem.
I have a main form with a subform set to Continuous Forms. It is populated by a query but is not related to the main form.
When the main form is opened, the record selected in the subform is highlighted. I want it not to be highlighted but have the cursor blinking on the left side of the text.
From the google newsgroups I found some code that worked at first, but as noted above, could not withstand the compaction/repair. I got no errors, it just stopped working!
Here is the code at the end of the OnOpen event of the form. I also tried it in the OnCurrent and in both but to no avail.
Forms![frmEnter_Tasks]![subfrmEnter_Tasks].SetFocus
Forms![frmEnter_Tasks]![subfrmEnter_Tasks]![txtTaskName].SetFocus
SendKeys "{F2}"
SendKeys "{HOME}"
I am simply blown away that this could work for a while and then abjectly, totally fail. Any advice will be most appreciated.
Regards, Sorrells