M
Marcel van Gessel
Hello, I try to create an autoopen macro wich starts from a Word 2007
document and links a query from an Access database. This query needs a
variable criteria.
It is not possible to create a parameter-query because Word does not see
this kind of query's.
So I dissided to use an inputbox for the filling of the criteria. However
the macro stops at the following rule:
..QueryString = "select * from `certificaat` where `modulecode` = `strcode`"
In this rule `certificaat` is the name of the query `modulecode` is the name
of the selectionfield and `strcode` is the name of the variable which has
been filled earlier with the inputbox.
When I replace the variabele `strcode` with the content of the criteria
(f.i. "wv") then the mailmerge is successfull, but when I use the name of the
variable (strcode) from the inputbox then it returns the errorcode 4198.
I already tried everything: yes or no brackets, apostrofs .........
Who can help me?
document and links a query from an Access database. This query needs a
variable criteria.
It is not possible to create a parameter-query because Word does not see
this kind of query's.
So I dissided to use an inputbox for the filling of the criteria. However
the macro stops at the following rule:
..QueryString = "select * from `certificaat` where `modulecode` = `strcode`"
In this rule `certificaat` is the name of the query `modulecode` is the name
of the selectionfield and `strcode` is the name of the variable which has
been filled earlier with the inputbox.
When I replace the variabele `strcode` with the content of the criteria
(f.i. "wv") then the mailmerge is successfull, but when I use the name of the
variable (strcode) from the inputbox then it returns the errorcode 4198.
I already tried everything: yes or no brackets, apostrofs .........
Who can help me?