Syntax error(missing operator) in query expression

Asked By 60 points N/A Posted on -
qa-featured

Hello,

I created two fields for me to able to calculate the grades of the students. Why do I get this error in MS Access?

 “Syntax error (missing operator) in query expression”

My query is Select [Quiz], [Homework] from Student Where [Average] = ([Quiz] + [Homework]);

Is there any other way to compute the average in another type of query? And do you experts have any suggestions on how to do it?

SHARE
Answered By 0 points N/A #83032

Syntax error(missing operator) in query expression

qa-featured

Hi,

Simply, the way you are using is wrong and that is why you are facing this problem. You haven't mentioned in your question what method of query-making you are using. I am sending you here the solution to the syntax error and after that the complete method you can use next time.

Syntax is like: Average: [Quiz] + [Homework]

Here, you will use: colon instead of = sign, and semi colon is not allowed when you are working on databases like MS Access.

Follow the procedure for the complete solution:

  1. Open Ms Access
  2. Create Table with the required fields
  3. Enter Records in the table via your software program.
  4. Click on “Queries” tab from the left Objects Menu.
  5. Double click on “Create Query in design View”.
  6. Add the required Table from the given list.
  7. Select required fields of the table. For Example, here you will select Quiz and Homework.
  8. After selecting required fields right click on the immediate blank field after the field you have selected

A pop up menu will appear. From that menu, select “Build” option.

  1. A build dialog box will appear
  2. In that box, type (same as it is): Average: Quiz + Homework and press enter.
  3. After that, for switching from the Design view to the Datasheet view, click on “View” from the menu bar and select “Datasheet View” from  the submenu list.

The calculated record will appear in the form of a table. Check the average field for the correct calculation.

Perform this process step by step and Enjoy the Solution.

Login/Register to Answer

Related Questions