D
David
Hello all,
I have found a nice bit of code from
'**********************************
'Created by Roger Carlson *
'(e-mail address removed)*
'(e-mail address removed) *
'**********************************
it provides the user the ability to create on the fly queries from a form.
It works well when the tables are in the same database as the form.
Unfortunately, I have a FE and BE.
Can someone help me modify this code to work with LINKED tables?
OR
I can have the form reside on the BE database, but how can I open the BE
form from the FE database?
Here is a line of code on the first cbo box to select the source of the query.
*******************************************************8
SELECT DISTINCT "Table: " & MSysObjects.Name , MSysObjects.Name AS Expr1
FROM MSysObjects WHERE (((MSysObjects.Name) Like "tbl*") AND
((MSysObjects.Type)=1)); UNION SELECT DISTINCT "Query: " & MSysObjects.Name
, MSysObjects.Name AS Expr1 FROM MSysObjects WHERE (((MSysObjects.Name) Like
"qsel*") AND ((MSysObjects.Type)=5));
*******************************************************
Here is the code in the AFTER UPDATE event of this cbo box.
*****************************************************
Dim strsql As String
strsql = "SELECT DISTINCT " & cboFieldName & " FROM " & cboTable & ";"
'MsgBox strSQL
Me!cboCriteria.RowSource = strsql
Me!cboCriteria.Requery
Me!txtFieldType = cboFieldName.Column(1)
****************************************************
Any assistance you can provide is very much appreciated.
David
I have found a nice bit of code from
'**********************************
'Created by Roger Carlson *
'(e-mail address removed)*
'(e-mail address removed) *
'**********************************
it provides the user the ability to create on the fly queries from a form.
It works well when the tables are in the same database as the form.
Unfortunately, I have a FE and BE.
Can someone help me modify this code to work with LINKED tables?
OR
I can have the form reside on the BE database, but how can I open the BE
form from the FE database?
Here is a line of code on the first cbo box to select the source of the query.
*******************************************************8
SELECT DISTINCT "Table: " & MSysObjects.Name , MSysObjects.Name AS Expr1
FROM MSysObjects WHERE (((MSysObjects.Name) Like "tbl*") AND
((MSysObjects.Type)=1)); UNION SELECT DISTINCT "Query: " & MSysObjects.Name
, MSysObjects.Name AS Expr1 FROM MSysObjects WHERE (((MSysObjects.Name) Like
"qsel*") AND ((MSysObjects.Type)=5));
*******************************************************
Here is the code in the AFTER UPDATE event of this cbo box.
*****************************************************
Dim strsql As String
strsql = "SELECT DISTINCT " & cboFieldName & " FROM " & cboTable & ";"
'MsgBox strSQL
Me!cboCriteria.RowSource = strsql
Me!cboCriteria.Requery
Me!txtFieldType = cboFieldName.Column(1)
****************************************************
Any assistance you can provide is very much appreciated.
David