|
-
Nov 10th, 2000, 04:45 PM
#1
Thread Starter
Junior Member
Hey all,
I'm trying to make my Datagrid show data based the contents of a combo box. I've got an Adodc set up, and have pointed the DataSource of the Datagrid to the main table in the database I'm using. Here's an example of the code I'm using:
Private Sub cmbProdFamily_Click()
sqlQuery = "SELECT Catalog_Number FROM IES WHERE Brand
= 'Metalux' AND Product = 'Paralux IV'"
Adodc1.RecordSource = sqlQuery
Adodc1.Recordset.MoveLast
Adodc1.Recordset.MoveFirst
Adodc1.Refresh
End Sub
I've used this method sucessfully with a standard Data control and an MSFlexGrid, but when I try to switch the recordsource for the Adodc in this case it generates this error:
"Syntax error in FROM clause"
I'm pretty comfortable with SQL, so what's up?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|