weird results

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have =Sum([Front])+([Monthly Production for Flash].[Form].[text12]) in one
of my forms. It gets changed to =Sum([Front])+([Monthly Production for
Flash].Form.text12) and gives me weird results. Does anyone know why it
keeps changing....it is driving me nuts.

Thanks
 
Not sure of what's behind it but the normal form of address for your
form needs the collection name in front of it I think.

It all depends on where the control is, on what form and where the
control Text12 is. Those things are important. So are spaces in
control and field names. The format that Access is changing your
statement to is probably ok as the [ ] are mostly only required when
there are spaces or there is an ambiguity in what is being addressed -
MonthlyProdForflash is a far better name for an Access object.

Back to your addressing problem, it depends on where the control you
are addressing is. If you are on the Main Form and ...

.... it is on the same form
Me![ControlName].Text12
or Forms![FormName]![ControlName].Text12
The full address like that is slower and more inefficient

.... it is on Subform1
Me!Subform1.form![ControlName]

.... it is on SubForm2
Me!Subform1.form!SubForm2.form![ControlName]

Cheers
Brett

I have =Sum([Front])+([Monthly Production for Flash].[Form].[text12]) in one
of my forms. It gets changed to =Sum([Front])+([Monthly Production for
Flash].Form.text12) and gives me weird results. Does anyone know why it
keeps changing....it is driving me nuts.

Thanks

Cheers,
Brett
 
Oops, just re-read this, I have duplicated the [ControlName] and
Text12 in my example where in fact they are the same thing. Revised
as

If you are on the Main Form and ...
.... it is on the same form
Me![ControlName]
or Forms![FormName]![ControlName]
The full address like that is slower and more inefficient

.... it is on Subform1
Me!Subform1.form![ControlName]

.... it is on SubForm2
Me!Subform1.form!SubForm2.form![ControlName]

Sorry about the sloppy work there

Brett



Back to your addressing problem, it depends on where the control you
are addressing is. If you are on the Main Form and ...

... it is on the same form
Me![ControlName].Text12
or Forms![FormName]![ControlName].Text12
The full address like that is slower and more inefficient

... it is on Subform1
Me!Subform1.form![ControlName]

... it is on SubForm2
Me!Subform1.form!SubForm2.form![ControlName]

Cheers
Brett
Cheers,
Brett
 
Back
Top