P
Pat
I have an Access database (MIP_MCC_Review.mdb) with two tables (MCC and MIP)
that contain data submitted by users using forms of the same names. I have a
query that I built in Excel Microsoft Query that will get specific data
(rows) from the tables in Access and import that data into Excel in a new
worksheet of a workbook that I use (MCC_MIP_Review.xls) for calculations on
the data. I wrote a macro that will create the new worksheet (MIP_Data) and
that works fine. What I want to do now is to modify the same macro to launch
a form I created (dialog box) with one text box and an OK button so the user
can enter a five character string that will determine what specific rows to
get from the database. Once the user enters the search string and clicks OK,
I want to change the SQL "Where" statement to what the user entered in the
dialog box. In other words, my SQL Select statement is WHERE (MIP.`Employee
SEID`='DK8FB'), and based on what the user entered into the dialog box, I
want to change it to WHERE (MIP.`Employee SEID`='HF5JK'), if HF5JK was what
the user entered. Is it possible to change SQL statements based on user input
from a dialog box? If so, how would I do that all in the same macro? Any
assistance would be appreciated.
that contain data submitted by users using forms of the same names. I have a
query that I built in Excel Microsoft Query that will get specific data
(rows) from the tables in Access and import that data into Excel in a new
worksheet of a workbook that I use (MCC_MIP_Review.xls) for calculations on
the data. I wrote a macro that will create the new worksheet (MIP_Data) and
that works fine. What I want to do now is to modify the same macro to launch
a form I created (dialog box) with one text box and an OK button so the user
can enter a five character string that will determine what specific rows to
get from the database. Once the user enters the search string and clicks OK,
I want to change the SQL "Where" statement to what the user entered in the
dialog box. In other words, my SQL Select statement is WHERE (MIP.`Employee
SEID`='DK8FB'), and based on what the user entered into the dialog box, I
want to change it to WHERE (MIP.`Employee SEID`='HF5JK'), if HF5JK was what
the user entered. Is it possible to change SQL statements based on user input
from a dialog box? If so, how would I do that all in the same macro? Any
assistance would be appreciated.