Formulas

  • Thread starter Thread starter Devan
  • Start date Start date
D

Devan

I need alot of help. I am new to the access software and I am trying to
create a database. I need a formula from excel to work in access.

blank=rates*discount

how can i make a field equal one field times another field
 
Use a new query. Bring the table and, in the grid, type:


Blank: rates * discount


Bring other fields in the grid, as appropriate.

Save. Use the query (as support to a form, as example).



Hoping it may help,
Vanderghast, Access MVP
 
I have no idea what you are reffering to. When I say I am new I am so
serious. I need step by step instructions. I know how to get intot he
expressions but that is it. Am I even close?
 
No. No need to go into the expression.

If you create a new query, you specify a table on which your query will do
something. I assume you already have that table, with, at least, its two
fields, rates and discount. Bring that table.

Now, your query editor has two parts, the top half, with the table you just
mentioned. Drag its two fields, one at a time, in the grid, the bottom part
of the query editor.

Next, in the third column of the grid, first line, type:


Blank: rates * discount


Save your query. You can take a look in data view (instead of design view)
to see the rates, the discount, and the result of the multiplication under
a new column name Blank.



Vanderghast, Access MVP
 
Devan said:
I have no idea what you are reffering to. When I say I am new I am so
serious. I need step by step instructions. I know how to get intot he
expressions but that is it. Am I even close?

No, I'm not sure what expressions you are talking about. Assuming you have
the database open,

1. click into the Queries tab on the database window
2. Click the New button and select the Design option
3. Select your table from the list in the dialog and click OK (or is it
Close?)
4. Drag and drop the fields you want the query to return into the grid
5. In and empty column in the grid, type the formula Michel provided into
the top line
6. Run the query and verify it does what you intend.
7. Save the query so your new column will be usable by other queries you
create
 
I get an error that says

"The expression you entered contains invalid syntax.

???????????? I did everything that you told me to do. I created a new query,
i used the query editor, drug the two fields, one at a time, put the first
field in the first column in the bottom part, drug the second field into the
second column in the bottom part, in the third column i typed

Discounted Rate: Imperial Rates * discount

I went to save the query and got that error
 
Devan said:
I get an error that says

"The expression you entered contains invalid syntax.

???????????? I did everything that you told me to do. I created a new
query, i used the query editor, drug the two fields, one at a time,
put the first field in the first column in the bottom part, drug the
second field into the second column in the bottom part, in the third
column i typed

Discounted Rate: Imperial Rates * discount

I went to save the query and got that error

The problem is you used spaces in your field names (something we did not
know about). When you use spaces (and other "irregular" characters) you need
to surround the field names with brackets - to be safe, surround all the
field names with brackets when you are entering formulas:

[Discounted Rate]: [Imperial Rates] * [discount]
 
Devan said:
I get an error that says

"The expression you entered contains invalid syntax.

???????????? I did everything that you told me to do. I created a new
query, i used the query editor, drug the two fields, one at a time,
put the first field in the first column in the bottom part, drug the
second field into the second column in the bottom part, in the third
column i typed

Discounted Rate: Imperial Rates * discount

I went to save the query and got that error

I made a mistake in my previous reply: the column alias should not be
bracketed. It should look like this:

Discounted Rate: [Imperial Rates] * [discount]
 
i get a #error in the blank field

Bob Barrows said:
No, I'm not sure what expressions you are talking about. Assuming you have
the database open,

1. click into the Queries tab on the database window
2. Click the New button and select the Design option
3. Select your table from the list in the dialog and click OK (or is it
Close?)
4. Drag and drop the fields you want the query to return into the grid
5. In and empty column in the grid, type the formula Michel provided into
the top line
6. Run the query and verify it does what you intend.
7. Save the query so your new column will be usable by other queries you
create

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
 

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