Me.recalc error

haroon.mansha

Registered User.
Local time
Today, 17:49
Joined
Jun 6, 2013
Messages
106
Hi all,

I have a parent form with subform

Subform fields summed with the help of Dsum at parent footer.

I have put me.recalc in afterupdate of field. But when I run the form it gives error runtime 3314 for the other required fields.

If I make field required to no there is no error. Can anybody tell me how I should do

Parent form name is SalesM
subform name is Sales

Thanks in advance.
 
Hmm, have you tried a Me.Requery instead? Does that give the same error?
 
Thanks for help
Yes same Error
 
Put in a value in all required fields, the do a Me.Requery afterwards.
 
Hi all,

I have a parent form with subform
Subform fields summed with the help of Dsum at parent footer.
I have put me.recalc in afterupdate of field. But when I run the form it gives error runtime 3314 for the other required fields.
If I make field required to no there is no error. Can anybody tell me how I should do
Parent form name is SalesM
subform name is Sales
Thanks in advance.

Is DSum the correct way to go? I would have thought SUM would do the trick.

I forget the correct Refresh command. But try Refresh, Requery (Although this will go back to the first record) then there is Repaint.

It is not 100% clear to me as to which control you are refering to.

I have put me.recalc in afterupdate of field. Which Field.

Have you changed the Names of any of the controls. eg. Text25 to TxtVolvo. Or similar.

When does this Refresh take place? Like before Update on the Form.

Have a look at the source control. The Query. Is there any errors when it opens.

Hope this helps a little and does not confuse too much.
 
Dsum I have done in parent form footer to get the totals of records in sub form. And me.recalc put in afterupdate of field which totals I need in main form footer
 
Moreover if there is no other required fields the error does not come.
 
It would be nice to see a copy of your Database. Cut down with all the private bits taken out.

You may have to remove all the data and replace it with Dummy Data if things are too sensitive. 3 or 4 records is usually enough.
 
Pls open SalesM form and enter new record in subform

It will not allow to do so because of required field
 

Attachments

I can't download this and get to open.

I see that others have downloaded so maybe they can help. At 1.03 MB something does not appear to be correct. After all we are only looking at 2 Forms a couple of Queries and Tables with a few records.

I am going to have to get you to have another look.

If you could supply a database in Access 2003 then that would be better, for me that is.
 
If no one comes back with a Reply and I get a minute I'll have a look later today.
 
Hmm, well, I don't get any error but I don't get what you are trying to Sum. If it is in the Footer of the Main form then putting the Me.Recalc or Me.Requery on the fields in the Subform would not help. You need to requery the ones in the Main Form Footer.
 
Try putting the below in the After_Update event the Controls changing the names to suit...

Code:
Forms![[B]MainFormName[/B]]![[B]ControlOnMainFormName[/B]].Requery
 
Hi,
Thanks for helping, I have tried but doesnot work, Same error for other field which is required in table properties. If I remove this as required then all these work


pls note these I all applying in after update event of sprice in Salessubform in SalesM master forum
 
Okay, I see I was looking at the wrong Form. The first problem is your formula. Try replacing it with...

Code:
=Sum("Sprice","Sales",[Sinv]=[Forms]![SalesM].[Sinv])

The above worked for me.
 
Thanks for helping

Do you mean replacing it with Dsum it will work and requery in afterupdate as you informed above.
 

Users who are viewing this thread

Back
Top Bottom