UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V < 1 2  (Go to first unread post)
   Reply to this topicStart new topic
> After Requery Return Back To Active Record    
 
   
Peter Hibbs
post Jun 1 2012, 12:54 PM
Post#21


UtterAccess VIP
Posts: 1,431
Joined: 17-June 10
From: Dorset. UK.


Hi Larry,
OK, I can see why there has been some confusion with your question since this problem has nothing to do with the original question.
Anyway, the sums of the columns do add up correctly (as far as I can tell).
Osuspect that what you are referring to is that all the totals field show #Error whenever you add a new record to the list and I believe this is due to the Tonnage calculation in the query returning an error because the Weight column defaults to Null on a new record. If this is the problem then one way you can fix it is to change the Tonnage calculation in the query to look like this :-
Tonnage: Round((CCur(Nz([Weight],0))/2000),2)
That is, change the Weight variable in the calculation to zero if it is Null. Alternatively you make sure the Weight field always defaults to zero instead of Null. If it is something more complicated then I would suggest you start a new thread so that more people can see it.
HTH
Peter Hibbs.
Go to the top of the page
 
lkbree51
post Jun 1 2012, 01:36 PM
Post#22



Posts: 1,607
Joined: 21-October 10
From: South Central Kentucky


Thanks for the reply Peter
That is was not the problem...I had already fixed that by making it place a Default zero in the field.
It is the totals in the footer of the subform...they are not recalculating when a new entry is made as I stated earlier...need to Requery it somehow... <e field.
Thanks any way
Larry
Go to the top of the page
 
foxtrojan
post Jun 1 2012, 11:15 PM
Post#23



Posts: 1,079
Joined: 8-May 06
From: Singapore


Hi Peter. I have this error message "Compile Error: Argument not optional". Where to trouble shoot this?
Go to the top of the page
 
Peter Hibbs
post Jun 2 2012, 02:32 AM
Post#24


UtterAccess VIP
Posts: 1,431
Joined: 17-June 10
From: Dorset. UK.


Hi,
Well, that is a bit difficult to say without knowing what you have done. Show me the code that you are using in your Continuous form (I assume you have added the code I supplied to a Cod Module).
Peter Hibbs.
Go to the top of the page
 
foxtrojan
post Jun 2 2012, 05:14 AM
Post#25



Posts: 1,079
Joined: 8-May 06
From: Singapore


Thanks Peter, I think I get tou, I may have placed the FormRequery.Me in between that caused this confusion. I'll do some home-work and get back to you. Thanks alot for your help.
Go to the top of the page
 
Peter Hibbs
post Jun 2 2012, 05:23 AM
Post#26


UtterAccess VIP
Posts: 1,431
Joined: 17-June 10
From: Dorset. UK.


Hi,
Yes, you need :-
FormRequery Me
not
FormRequery.Me
Good luck,
Peter Hibbs.
Go to the top of the page
 
daschrislydon
post Dec 4 2017, 09:17 PM
Post#27



Posts: 78
Joined: 28-August 15



I knowthis is a pretty old topic, but just in case this is useful to anyone...
I had a form where this FormRequery wasn't working properly - it wasn't getting to the bottom fo the RecordsetClone before doing the Recordcount.
So I added in a frm.RecordsetClone.MoveLast before that line, and it seemed to sort it.
Just in case this is useful to anyone else with this code.
Thanks to the original poster of the code - works really neatly!

CODE
    frm.RecordsetClone.MoveLast    '<--- Added
    frm.SelTop = frm.RecordsetClone.recordcount


Thanks

Chris
Go to the top of the page
 
Peter Hibbs
post Dec 5 2017, 09:39 AM
Post#28


UtterAccess VIP
Posts: 1,431
Joined: 17-June 10
From: Dorset. UK.


OK, thanks Chris.

Peter.
Go to the top of the page
 
2 Pages V < 1 2


Custom Search
RSSSearch   Top   Lo-Fi    16th December 2017 - 11:30 PM