Requery Subform

I'm afraid... The hurry.
Db3

I digit two times entry for a patient and each time I pressed button it updates the previous entry. It does not update in real timeView attachment Db3.accdb
 
I'm working on a splitted database named Work. The only BE I have is Work_BE.
I include it . But I don't know if it works because the Db1 I sent it is built for the forum and it is not split.
Anyway I upload also Work_BE
View attachment 59849

I would not have spaces in field names.
I would not include total fields in tables. Calculated totals in queries when needed.

I have attached a reformatted jpg of your tables and relationships
 

Attachments

  • RelationshipsKill.jpg
    RelationshipsKill.jpg
    42.8 KB · Views: 135
The problem is very simple.

When you enter data in your form nothing happens, you press the save button and it refreshes the sub-form (without any change), then you close the form and it saves the record.

The record does not exist when you refresh the sub-form.

You need to run an update query to create the record before refreshing the form and then stop it creating another record when you close the form.
 
Have set up a trick. On the mainform when clicking subform is requeryed. For the moment I can accept before engaging an update query that I should study.
But another problem has arised. If the mainform containing the subform is closed when I go to entry data from PIPForm I get error 2450 "Impossible to find form FRMMesePrecedentePIP"- how can I overcome this issue?
 
I am guessing you still have your requery in place and it cannot requery a form that is not open. The data is entered into a table so this will have no effect.
 
Solved Tieval.
Simply put on mainform
Code:
Me.[FRMSottomaschera QueryPIPConcatRelatedsuMesePrecedente].Requery
on Activate e on SetFocus property.
No more error 2450, and it requery and update the form.
Thanks for your suggestion .
:o
 

Users who are viewing this thread

Back
Top Bottom