S
S. Jackson
Form is named fsubRpts. Control source: tblReports
First control is an unbound combo box. Source:
SELECT [Name]
FROM MSysObjects
WHERE [Type] = -32764;
Second control is bound text box. Source tblReports[RptName].
I want the user to select a Report file name from the combo box and have
this selection added to tblReports if not in the table. Then I want the
remaining controls that are bound to the tblReports to display corresponding
information if the user happens to select a report already in the table.
My first attempt is failing because I am getting the actualy sql string
pasted into the first control:
Dim strSQL As String
strSQL = "Select tblReports.RptName, " _
& "FROM tblReports " _
& "WHERE tblReports.RptName = " & Me.RptFilecmbo & ""
Me.RptName = strSQL
How do I fix this, or is it too complicated for me (beginner VBA)?
S. Jackson
First control is an unbound combo box. Source:
SELECT [Name]
FROM MSysObjects
WHERE [Type] = -32764;
Second control is bound text box. Source tblReports[RptName].
I want the user to select a Report file name from the combo box and have
this selection added to tblReports if not in the table. Then I want the
remaining controls that are bound to the tblReports to display corresponding
information if the user happens to select a report already in the table.
My first attempt is failing because I am getting the actualy sql string
pasted into the first control:
Dim strSQL As String
strSQL = "Select tblReports.RptName, " _
& "FROM tblReports " _
& "WHERE tblReports.RptName = " & Me.RptFilecmbo & ""
Me.RptName = strSQL
How do I fix this, or is it too complicated for me (beginner VBA)?
S. Jackson