Hello.
I have a form, in datasheet view, that contains many records.
I first placed the following action on the load of the form
Go To Record = New
This put the cursor in a new record, which I wanted, but the new record is at the very bottom of the screen, which is not very pretty.
So I placed the following actions on the load of the form.
GoToRecord = New
SendKeys = {PGDN}{UP}{UP}{UP}{UP}{UP}{UP}
GoToRecord = New
This took the cursor to the bottom of the page, paged down, scrolled up six spaces, and then put the cursor in a new record. This way, only the last six records are displayed, and the content is toward the top of the screen, which looks a lot nicer. I know this is not very graceful, but it is the only thing I have found, so far, that does what I want it to do.
My problem is there is also a popup window that can be launched and will come up on top of the initial form (but not from it). This popup contains subforms, also in datasheet view, that I want to behave the same way. What happens is that when the popup comes up, it runs through the same code. The code not only affects the subforms, but the initial form as well, which causes the cursor in the initial form to move.
What is the best way to have this code apply only to the popup window? Apparently, the SendKeys command does not specify and is being confused.
If there is a better way to accomplish these things, I would LOVE to hear about it.
Thanks.
I have a form, in datasheet view, that contains many records.
I first placed the following action on the load of the form
Go To Record = New
This put the cursor in a new record, which I wanted, but the new record is at the very bottom of the screen, which is not very pretty.
So I placed the following actions on the load of the form.
GoToRecord = New
SendKeys = {PGDN}{UP}{UP}{UP}{UP}{UP}{UP}
GoToRecord = New
This took the cursor to the bottom of the page, paged down, scrolled up six spaces, and then put the cursor in a new record. This way, only the last six records are displayed, and the content is toward the top of the screen, which looks a lot nicer. I know this is not very graceful, but it is the only thing I have found, so far, that does what I want it to do.
My problem is there is also a popup window that can be launched and will come up on top of the initial form (but not from it). This popup contains subforms, also in datasheet view, that I want to behave the same way. What happens is that when the popup comes up, it runs through the same code. The code not only affects the subforms, but the initial form as well, which causes the cursor in the initial form to move.
What is the best way to have this code apply only to the popup window? Apparently, the SendKeys command does not specify and is being confused.
If there is a better way to accomplish these things, I would LOVE to hear about it.
Thanks.