Problem with record storage and a button in an endless form

A

akko

Hi, maybe someone can give me a hint.

i m entering data directly in an endless form. In the header i have a print
button.

When i enter the last record and go directly to the button to press it, the
last record isnt't in the database. (record still in edit mode)

I tried to set a new focus on the button first, but that doesnt't help. Also
a docmd.goto newrec doesn't work proberly.

Any ideas?

regard
akko
 
D

Douglas J. Steele

In the Click event of the button, put code along the lines of:

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

That will check whether the current record has been edited but not saved,
and save it if so.
 
A

akko

that's it.

grazie

Douglas J. Steele said:
In the Click event of the button, put code along the lines of:

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

That will check whether the current record has been edited but not saved,
and save it if so.
 

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