
February 2nd, 2004, 05:42 AM
|
|
Contributing User
|
|
Join Date: Dec 2003
Posts: 54
Time spent in forums: 2 h 2 m 28 sec
Reputation Power: 5
|
|
Query in msaccess - VB link
Hi,
A friend of mine asked me to do some stuff in ms access.
I created a a form (frmPeriod) in which I have a simple VB code which refers to a query defined in msaccess (Qperiod).
In the VB code I make the following statement which executes the query.
strStartdate = "20031231000000"
DoCmd.OpenQuery ("Qperiod")
The Qperiod query is defined in msaccess - hereby I want to use a criteria which uses the strStartdate value from the VB code. In the query Qperiod I make a criterium like this:
>"expr:Forms!frmPeriod!strStartdate"
The query is executed however the result is not correct. It seems that I make a wrong link with the expression (strStartDate). Does anybody know where I am going wrong?
Thanks!
Jamie
|