First of all, let me start by saying that I'm fixing a problem on a database that I did not build and rewriting or changing the structure is not feasible. Also, this works when running the database in Access2002 or 2000, but not 2003.
I have a query that pulls criteria from a form, one of the criteria is pulled from a subform on the form. The problem is that the query pulls all values except the value from the subform. By the way, the value I want from the subform is in a combo box if that makes any difference. If I use only the criteria from the form (eliminate the value from the subform) the query works perfectly. I put a hidden field on the main form and when the button is clicked to execute the query, I set the value of the hidden field to the value on the subform and then pull the hidden fields value for the criteria and it works. In other words, I can capture the value in the subform using vba but not in the query. The query seems to be able to pull values only from the main form.
Any reason why and does anybody know how to fix it? As you can see, I have a workaround which is fine for one value, but one shouldn't have to duplicate every field from a subform just to pull the value into a query.
Thanks in advance for any help,
TwoOdd
--------------
Good judgment comes from experience, and experience comes from bad judgment.
-- Barry LePatner
I have a query that pulls criteria from a form, one of the criteria is pulled from a subform on the form. The problem is that the query pulls all values except the value from the subform. By the way, the value I want from the subform is in a combo box if that makes any difference. If I use only the criteria from the form (eliminate the value from the subform) the query works perfectly. I put a hidden field on the main form and when the button is clicked to execute the query, I set the value of the hidden field to the value on the subform and then pull the hidden fields value for the criteria and it works. In other words, I can capture the value in the subform using vba but not in the query. The query seems to be able to pull values only from the main form.
Any reason why and does anybody know how to fix it? As you can see, I have a workaround which is fine for one value, but one shouldn't have to duplicate every field from a subform just to pull the value into a query.
Thanks in advance for any help,
TwoOdd
--------------
Good judgment comes from experience, and experience comes from bad judgment.
-- Barry LePatner