Access SETFOCUS question

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

ABAPer

Thread Starter
Joined
Sep 14, 2004
Messages
9
In the course of programming a timesheet, I must tally both columns and rows for total hours. I would like to tally these numbers as the hours are being entered. But in order to achieve this, I placed the code in the AFTERUPDATE event requiring that I SETFOCUS many times. The problem is...I don't know where the true SETFOCUS should be when I'm done. The AFTERUPDATE event is triggered on Enter, Tab or Cursor movement. Is there a way to capture the intended next field during an AFTERUPDATE event?

Thanks,

Ken
 
Joined
Jul 29, 2001
Messages
21,334
If the form or report element has a name you can set the focus to any of these items using Afterupdate. You can also write a procedure that will run and once it finishes you can set the focus anywhere you like.
 

ABAPer

Thread Starter
Joined
Sep 14, 2004
Messages
9
Setting Focus is not the problem. The problem is trying to figure what field the user clicked one in the AFTERUPDATE event.

I have a subform when 10 rows and several columns for the days of the week. I want a total at the end of each row and column. The user clicks on the "Monday" column in the first row and enters a number. The user then moves the cursor to the "Tuesday" column of the first row and click the mouse. The Monday's AFTERUPDATE is executed where the SETFOCUS moves to many locations to tally the total hours. My problem is how do I figure out the user clicked on the Tuesday cell? When the code first starts, it appears the focus is still on Monday.

I hope I have described my problem with enough detail.

Thanks,

Ken
 
Joined
Jul 29, 2001
Messages
21,334
I get it...lemme think on this one.

Could you post a screen shot of your data entry page for a better idea of the input procedures?
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top