Re: CREATE VIEW
- From: witek <witek7205@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 12 Oct 2006 06:20:27 -0500
Allen Browne wrote:
Thanks. But I don't use MS Access forms.
Query is called from Excel.
Everything works fine from VBA but when I tried to do the same in MS Access it failed.
I started building query in MS Access which failed. It was surprise for me because I was almost sure that query is build correctly.
If the query failed when executed in code, it probably contained a reference like:.
[Forms].[Form1].[Text1]
That kind of thing requires the Expression Service, which is not available if the OpenRecordset or Execute the query in code. Instead, concatenate the value from the form into the SQL string you wish to execute, e.g.:
strSql = "SELECT * FROM Table1 WHERE Surname = """ & [Forms].[Form1].[Text1] & """;"
That issue is much more common than the ADO-specific one in your post.
- References:
- CREATE VIEW
- From: witek
- Re: CREATE VIEW
- From: Allen Browne
- Re: CREATE VIEW
- From: witek
- Re: CREATE VIEW
- From: Allen Browne
- CREATE VIEW
- Prev by Date: Check boxes in query
- Next by Date: DELETE Record in Database
- Previous by thread: Re: CREATE VIEW
- Next by thread: Re: CREATE VIEW
- Index(es):
Relevant Pages
|