Using = sign in expressions

J

jayceejay

When is it necessary to preceed expressions with the equal sign? It would
seem that the examples in MS help all use =, but when I view sample
expressions within queries, the = is missing. I'm an old Excel user. Could
someone explain when it is necessary to use the equal sign?
 
J

Jeff Boyce

If I recall my Excel correctly, you preceed a function/expression with "="
in Excel, to let Excel know to do a calculation.

In Access, you use "=" to "set" the value of one side of the equation to the
other side.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
F

fredg

When is it necessary to preceed expressions with the equal sign? It would
seem that the examples in MS help all use =, but when I view sample
expressions within queries, the = is missing. I'm an old Excel user. Could
someone explain when it is necessary to use the equal sign?

In a query, when you set a new column to an expression you would use
NewColumnName:[FieldA]*[FieldB]

In a report or form expression, you would start with an Unbound
control. Then set it's control source to
=[FieldA]*[FieldB]

In VBA code, you would also use the = sign.
VariableName = [FieldA]*[FieldB]
 
J

jayceejay

THANK YOU! I get it now.

fredg said:
When is it necessary to preceed expressions with the equal sign? It would
seem that the examples in MS help all use =, but when I view sample
expressions within queries, the = is missing. I'm an old Excel user. Could
someone explain when it is necessary to use the equal sign?

In a query, when you set a new column to an expression you would use
NewColumnName:[FieldA]*[FieldB]

In a report or form expression, you would start with an Unbound
control. Then set it's control source to
=[FieldA]*[FieldB]

In VBA code, you would also use the = sign.
VariableName = [FieldA]*[FieldB]
 

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

Top