Any thing wrong with =[form]![Items]![LIST_PRICE] *2

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

Guest

I was trying to populate a field from another field called "List_Price" using
=[form]![Items]![LIST_PRICE] *2 expression on deafult value properties. It
keep on giving me error whenever I tried to save. The error is "Colud not
find field 'form]![Items]![LIST_PRICE
Is anyone familiar with this problem? Thanks for your help
QRS
 
The right syntax will be
forms![FormName]![FieldName]

forms![Items]![LIST_PRICE]
 
QRS,

Ofer's advice is correct, is that you have apparently omitted the "s"
form the end of "Forms". I am also wondering about your use of the
Default Value property... The Default Value applies at the point of
creation of a new record, so it can't refer to the value of another
field, since the other field has no value at the point of creation of a
new record.

--
Steve Schapel, Microsoft Access MVP

The right syntax will be
forms![FormName]![FieldName]

forms![Items]![LIST_PRICE]

:

I was trying to populate a field from another field called "List_Price" using
=[form]![Items]![LIST_PRICE] *2 expression on deafult value properties. It
keep on giving me error whenever I tried to save. The error is "Colud not
find field 'form]![Items]![LIST_PRICE
Is anyone familiar with this problem? Thanks for your help
QRS
 
Thanks Buddy.
But how do I increase the value of a filed (LIST_PRICE in this case) and
use it to populate another field of thesame record?
--
QRS


Steve Schapel said:
QRS,

Ofer's advice is correct, is that you have apparently omitted the "s"
form the end of "Forms". I am also wondering about your use of the
Default Value property... The Default Value applies at the point of
creation of a new record, so it can't refer to the value of another
field, since the other field has no value at the point of creation of a
new record.

--
Steve Schapel, Microsoft Access MVP

The right syntax will be
forms![FormName]![FieldName]

forms![Items]![LIST_PRICE]

:

I was trying to populate a field from another field called "List_Price" using
=[form]![Items]![LIST_PRICE] *2 expression on deafult value properties. It
keep on giving me error whenever I tried to save. The error is "Colud not
find field 'form]![Items]![LIST_PRICE
Is anyone familiar with this problem? Thanks for your help
QRS
 
QRS,

Well, will the "another field" always be equal to LIST_PRICE*2 ? If so,
you are best not to have a field at all. You can just put an unbound
textbox on the form or report, and set its Control Source property to...
=[LIST_PRICE]*2
 
Thanks Steve.
The fields type are currency so the have equal lenght. Can you sheld more
light on the your answer. I do not get that approache clearly.
All I want to do is to be able to increase tha value of field "A" and put it
in field "B" of thesame table.
--
QRS


Steve Schapel said:
QRS,

Well, will the "another field" always be equal to LIST_PRICE*2 ? If so,
you are best not to have a field at all. You can just put an unbound
textbox on the form or report, and set its Control Source property to...
=[LIST_PRICE]*2

--
Steve Schapel, Microsoft Access MVP

Thanks Buddy.
But how do I increase the value of a filed (LIST_PRICE in this case) and
use it to populate another field of thesame record?
 
Thanks Steve.
The fields type are currency so the have equal lenght. Can you sheld more
light on the your answer. I do not get that approache clearly.
All I want to do is to be able to increase tha value of field "A" and put it
in field "B" of thesame table.

No. You don't want to do this!

Storing derived data such as this in your table accomplishes
three things: it wastes disk space; it wastes time (almost
any calculation will be MUCH faster than a disk fetch); and
most importantly, it risks data corruption. If one of the
underlying fields is subsequently edited, you will have data
in your table WHICH IS WRONG, and no automatic way to detect
that fact.

Just redo the calculation whenever you need it, either as a
calculated field in a Query or just as you're now doing it -
in the control source of a Form or a Report textbox.


John W. Vinson[MVP]
 
Thanks John. If I want to go through Query approach. How do i go about that
and what format should i use?
 
QRS,

Make a query based on the table that contains the LIST_PRICE field. Add
to the query grid whichever fields from this table you want in yoiur
form or report. Then, in the Field row or a blank column in the query
design grid, make a calculated field like this...
AnotherField: [LIST_PRICE]*2
Then, you can put a textbox on the form or report which is bound to this
calculated field. Any formatting can be applied to the textbox on the
form or report, you probably don't need to worry about this within the
query.
 
Thanks it helps
--
QRS


Steve Schapel said:
QRS,

Make a query based on the table that contains the LIST_PRICE field. Add
to the query grid whichever fields from this table you want in yoiur
form or report. Then, in the Field row or a blank column in the query
design grid, make a calculated field like this...
AnotherField: [LIST_PRICE]*2
Then, you can put a textbox on the form or report which is bound to this
calculated field. Any formatting can be applied to the textbox on the
form or report, you probably don't need to worry about this within the
query.

--
Steve Schapel, Microsoft Access MVP

Thanks John. If I want to go through Query approach. How do i go about that
and what format should i use?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top