AndrewWolford
MIS
Hello everyone,
I can't seem to figure out why my query isn't working, I could use some help...
All I'm trying to do is reference a text box on a subform in a sql query, but it doesn't seem to be working. Here is my query:
SELECT *
FROM table1
WHERE table1.id = forms!formMain![table1 subform]!id;
"table1 subform" is a subform on formMain that has a couple text boxes, one being "id."
If I create a test textbox and run the query as:
SELECT *
FROM table1
WHERE table1.id = forms!formMain![txtTest];
it works. For some reason it doesn't like the subform part, but if I put the same code behind a comand button (tempvariable = forms!formMain![table1 subform]!id) it captures the value.
For the life of me, I can't figure out why SQL doesn' like that code... Does anyone have any suggestions?? Thanks!
Andrew
I can't seem to figure out why my query isn't working, I could use some help...
All I'm trying to do is reference a text box on a subform in a sql query, but it doesn't seem to be working. Here is my query:
SELECT *
FROM table1
WHERE table1.id = forms!formMain![table1 subform]!id;
"table1 subform" is a subform on formMain that has a couple text boxes, one being "id."
If I create a test textbox and run the query as:
SELECT *
FROM table1
WHERE table1.id = forms!formMain![txtTest];
it works. For some reason it doesn't like the subform part, but if I put the same code behind a comand button (tempvariable = forms!formMain![table1 subform]!id) it captures the value.
For the life of me, I can't figure out why SQL doesn' like that code... Does anyone have any suggestions?? Thanks!
Andrew