Query in VBA

Motorhead

Registered User.
Local time
Today, 02:45
Joined
Feb 19, 2002
Messages
11
Hello!

This is a part of a select query but on the where statement it goes wrong. I've got this code from an other database and there it works perfect.

"WHERE [" & table2 & "].Testset = Combo_TestSet.Value AND [" & table2 & "].TestID = Combo_SelectTest.Value "

When I run the code he asks me for Combo_SelectTestset.Value and Combo_Testset.Value. But both op the combo's have a value when I run this code.

I hope my question is clear and someone could help me.

Thanx and greetz,

Martijn
 
Try this

"WHERE [table2]!Testset = " & Forms!Yourform!Combo_TestSet & " AND table2!TestID = " & Forms!Yourform!Combo_SelectTest & "...etc

HTH

John
 
thanx, it worked!
 

Users who are viewing this thread

Back
Top Bottom