#  Other Applications & Softwares  > Access Tables & Databases >  > [SOLVED] Syntax error (Missing operator) in query expression

## lengwer

Hello, 

I am working in a database where I am trying to link two combo boxes to where when a specific selection from one box (dictionary) gives specific choices in the drop down in the other combo box. 

Here is where I obtained my information and what I have so far as well as the error I am reciving:

*Syntax error (Missing operator) in query expression 'Maint DBI.Description'.*

I based my information on example 2 from the site :  


```

```


This example uses a single table which provides data for the Row Source of both combo boxes. The table (Maint DBI) contains two fields, one for the Dictionary and the other for the Description to which it belongs...


I first created a standard list on an excel file and imported it. I named my imported file (Maint DBI).  

Dictionary    Description
Physician    Physician
Physician     Ref Physician
Referral       Outside Fac
Referral       Clinical Liaison
Referral       Discharge Planner
Referral       Multi Referrals

I set The Row Source property of the Dictionary combo box as Physician on the first line and Referral on the second line. 

I then placed the following code on the After Update event of the Dictionary combo box:



```
Please Login or Register  to view this content.
```


I am new to writing VBA. I am not sure how to set The Row Source property of the Dictionary combo box to take the form of a SQL statement to represent a query of the Maint DBI table returning the unique values found in the Description field, sorted into ascending order:




```
Please Login or Register  to view this content.
```


Please let me know if I am confusing on any part. 

thanks!!

----------


## alansidman

> I set The Row Source property of the Dictionary combo box as Physician on the first line and Referral on the second line.



I don't understand this statement.
You should be setting the row source for the combo box as



```
Please Login or Register  to view this content.
```


You do this by opening the properties for the combo box.  For the row source in the data tab, click on the ellipsis (...).  This will open a query in design view.  Select your table Maint DBI and the field dictionary.  Switch the view to SQL. In the upper left corner you will see an Icon that looks like a data sheet, click on the drop down arrow and select SQL.  Edit the SQL statement to include the work DISTINCT and then save and close the SQL statement.  Your SQL statement should look like your example.

----------


## lengwer

Since my previous post I have set my Row type set as: Table/Query I have My row source set with the SQL statment in "Write SQL query Builder" :




```
Please Login or Register  to view this content.
```

----------

