Move focus to new record with a single click

R

rustle

I have a form with multiple records on it (I think it's called Tabular). I
want the user to be able to select a certain field on the form and enter an
amount, then scroll down to another record, select that field and enter data,
etc.

Currently to select each record requires two clicks, the first click (just
after making the keystrokes for the data for the current record) doesn't move
the cursor to the field being clicked, but it does activate the lost focus
event of the field just entered. So it seems focus is lost from this field
but it doesn't appear in the new field being clicked.

If the user is made to click twice this makes the data entry slower where
there are a considerable number of records to update.

Is there a way to enter a piece of data then immediately click on a field in
another record lower down to select that field for data entry?
 
T

tina

suggest you examine the LostFocus, Exit, and AfterUpdate events of the form
control where the data entry and click activity is occurring - it sounds
like a macro or some code is running that forces the focus to move somewhere
else, on the first click...and then the second click moves the focus from
that "somewhere else" back into the control.

hth
 
R

rustle

Thanks for the clue. I had this code in the lost focus event:
If Me.Total_Paid = 0 Then
Me.Date_Paid = Null
Else
Me.Date_Paid = dateNextPayment
End If

I fixed the problem by adding Me.Refresh - it seems without this specific
refresh the change of field value set up the need for a form refresh which
was then done by the first click outside the record which left the focus
where is was.

Again thankyou
 
T

tina

you're welcome :)


rustle said:
Thanks for the clue. I had this code in the lost focus event:
If Me.Total_Paid = 0 Then
Me.Date_Paid = Null
Else
Me.Date_Paid = dateNextPayment
End If

I fixed the problem by adding Me.Refresh - it seems without this specific
refresh the change of field value set up the need for a form refresh which
was then done by the first click outside the record which left the focus
where is was.

Again thankyou
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top