I'm having a hell of a time creating this code.
I want to open a form to a specific record by clicking on the ID (click event on the textbox) of a record located in a subform of a currently opened form. The subform is in datasheet view (in case that matters)
There is an ID in the subform in a text box...txtSubID and I'll be matching it up with the ID in text box txtFormToOpenID.
I'm struggling with how to write the where statement in the DoCmd. Does the subform go first in quotes? Or does the one I want to open go first? Which should be in quotes and which should not?
And Should I be using the control source name or the text box object name...or both?
I'm losing my mind over here. I've found a lot of info on the internet but it doesn't work when I try the code.
I had it set up but using a command button wizard to set it up and then copied the macro to the click event of the textbox on the subform. It worked for a few days and then tanked out on me.
I then tried doing the same with a commend button again and converting the macro to code, but that didn't work either.
Thanks very much.