0
votes

During data entry in 1 form, I have open another bound form. The form list view of fields and a save button where calculations are made when the save button is hit.

The user could type a value in one of the fields in the list and click the save button before tabbing to a new record (the form does not allow additions) or to a different column. This is well know to result the new data not to be recognized. However, the end user can't be forced to do that. The result is that when the save button is hit, the old value is used and not the value the user has typed and can see.

I tried to set focus in the event button of the save button to non-visible text box but I got an error.

I also tried to use LosftFocus event, and I can access the new value for the field but I don't know how to make ms-access know that this a change in the table and make it commit it to the database table?

I also tried to use DoCmd to add the record but this causes the parent bound form to save its data not the dialog box, this does not work since the sequence of events should be that the user completes the dialog box and close it before returning to the original form.

What can I do?

enter image description here

Thanks.

1

1 Answers

1
votes

Coludn't you use in the click event of the button:

If Me.Dirty = True Then
    Me.Dirty = False
End If

to save the record?