Correct syntax for referencing a form control????

  • Thread starter Thread starter Weeble
  • Start date Start date
W

Weeble

I have a report that has calculated some totals for me and I want to put
these totals into another calculation instead of re-writing the whole thing
again.

I keep getting a message telling me the report doesn't exist or that the
name is typed incorrectly. I can only conclude my syntax is incorrect.

This is what I used:

CorrectionsTtl = Reports![ProductionInfoAttendance]![CorrectionsTotal]

I have confirmed the spelling on my report and my field.
 
Weeble said:
I have a report that has calculated some totals for me and I want to put
these totals into another calculation instead of re-writing the whole
thing
again.

I keep getting a message telling me the report doesn't exist or that the
name is typed incorrectly. I can only conclude my syntax is incorrect.

This is what I used:

CorrectionsTtl = Reports![ProductionInfoAttendance]![CorrectionsTotal]

I have confirmed the spelling on my report and my field.


Your message subject says "form control", but you're talking about a control
on a report, right?

Your syntax appears to be correct, but will only work if the report is open
(presumably in Print Preview) at the time you execute the statement. If it
isn't, you should expect to get the message, "The report name
'ProductionInfoAttendance' you entered is misspelled or refers to a report
that isn't open or doesn't exist." If that's the message you're guessing,
then I guess the report isn't open when you execute the code.
 
Dirk,

Thanks. That took care of it. I feel a bit stupid about now.

Dirk Goldgar said:
Weeble said:
I have a report that has calculated some totals for me and I want to put
these totals into another calculation instead of re-writing the whole
thing
again.

I keep getting a message telling me the report doesn't exist or that the
name is typed incorrectly. I can only conclude my syntax is incorrect.

This is what I used:

CorrectionsTtl = Reports![ProductionInfoAttendance]![CorrectionsTotal]

I have confirmed the spelling on my report and my field.


Your message subject says "form control", but you're talking about a control
on a report, right?

Your syntax appears to be correct, but will only work if the report is open
(presumably in Print Preview) at the time you execute the statement. If it
isn't, you should expect to get the message, "The report name
'ProductionInfoAttendance' you entered is misspelled or refers to a report
that isn't open or doesn't exist." If that's the message you're guessing,
then I guess the report isn't open when you execute the code.

--
Dirk Goldgar, MS Access MVP
Access tips: www.datagnostics.com/tips.html

(please reply to the newsgroup)
 
Back
Top