Re: Summing it all up

From: Allen Browne (AllenBrowne_at_SeeSig.Invalid)
Date: 09/23/04


Date: Thu, 23 Sep 2004 13:53:14 +0800

No. Set the Format to Currency, of course.

If it still doesn't figure, open the Immediate Window (Ctrl+G), and work
with it there until you get the reference right. In that context you can't
use Me, so try:
    Forms("NameOfYourMainFormHere")![NameOfYourSubformControlHere].ControlType
That should give you 112

>From there try going further:
    Forms("NameOfYourMainFormHere")![NameOfYourSubformControlHere].Form![Subtotal]

You should be able to track down which part is the wrong name.

BTW, if you have not done so yet, make sure that you uncheck the boxes
under:
    Tools | Options | General | Name AutoCorrect
The compact the database:
    Tools | Database Utilitites | Compact
Explanation of the problems this "feature" can cause you:
    http://members.iinet.net.au/~allenbrowne/bug-03.html

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"grep" <grep@grep.com> wrote in message
news:estDtNRoEHA.260@TK2MSFTNGP10.phx.gbl...
> Hmm... Still get an error.
>
> 1. Changed the Format property to Currency.
> 2. Check - I had it right, and since I'm using the Expression Builder to 
> construct the actual reference piece (below), I know I didn't misspell it.
> 3. All correct, except that I'm not sure what you meant by "set the Format 
> property to Yes". The field is a Currency field. How could I set it to 
> Yes?
>
> Thanks, Allen.
>
> grep
>
> Allen Browne wrote:
>
>> Some things to check:
>> 1. In the subform, check the Name of the Subtotal text box, and set its 
>> Format property to Currency so Access knows the data type.
>>
>> 2. In the main form, double check the Name property of the subform 
>> control (not necessarily the same as its Source Object).
>>
>> 3. In the text box that gives the error, check:
>> - you included the equal sign;
>> - the subform name is correct;
>> - you included the ".Form" bit;
>> - you got the name of the subform text box right (Subtotal?);
>> - you set the Format property to Yes.
>>
>> 4. If the subform is read-only, or its AllowAdditions property is set to 
>> No, it will go completely blank when there are no new records to display. 
>> Then referring to the non-existent text box in the subform will cause 
>> #Error.
>>
>> 5. If the calcuation is actually more complex, make sure it cannot cause 
>> an error such as division by zero, or invalid typecasting 


Relevant Pages

  • Re: reports
    ... I fail to see where you used the Format() function as shown. ... Allen Browne - Microsoft MVP. ... Format property to Currency or Short Date or whatever. ...
    (microsoft.public.access.reports)
  • Changing formatting
    ... I have a subform that needs the numeric value format ... changed from currency to standard based on the choices the ...
    (microsoft.public.access.formscoding)
  • Re: Sorting date in subform
    ... The field in question is in a subform. ... the Format property of in the subform but the syntax is not ... particular the textbox to which the field Interview_Date is bound has a Format ... PMJI, John, but have you guys established that this really ...
    (microsoft.public.access.modulesdaovba)
  • Re: Sorting date in subform
    ... The field in question is in a subform. ... the Format property of in the subform but the syntax is not ... particular the textbox to which the field Interview_Date is bound has a Format ... You don't say what syntax you're using to set the format so I am not sure how ...
    (microsoft.public.access.modulesdaovba)
  • Re: Summing it all up
    ... Changed the Format property to Currency. ... Allen Browne wrote: ... double check the Name property of the subform control ...
    (microsoft.public.access.formscoding)