Well, I don't know exactly what you mean by:
I have a button on my dashboard once clicked, will prompt a Access criteria search and then will display my report.
From the sound of it, depending on the look you want, I would either put the textbox on your dashboard and have the above code there, or the button on the dashboard simply opens this new form, and the above code is there. Either way, the report query uses that textbox in its criteria instead of [Enter blah]. So either
Input into textbox on dashboard/button code validates 8 characters, opens report if so, message box if not.
Or
Button on dashboard opens new form/input into textbox on this new form/button code validates 8 characters, opens report if so, message box if not.
If your dashboard is a "Switchboard" that uses the table to determine its selections, you may be stuck with the second option. I'm not sure, as I've never cared for the switchboard and don't use them.