C
Cire via AccessMonster.com
Hi all, i got a problem which i hope you guys will help me on. I created
several forms, the main form with command buttons that leads to other forms
where users can key in their conditions for queries, i.e. parameter forms
After building the SQL string using createquerydefs
i use the code:
DoCmd.OpenQuery "Requests_open_module", acViewNormal
to open the query.
all these is assigned to a command button on click event. however when i
click on the button in form view, the query result appears in a window behind
the parameter form instead of on top of it.
so i tried:
DoCmd.OpenForm "weekly_open_requests_result", acFormDS, , ,
acFormPropertySettings, acWindowNormal
where weekly_open_requests_result is a form linked to the
Requests_open_module query. And i get the same result, upon clicking, the
form appears at the back instead of on top.
finally i went to the weekly_open_requests_result form and enabled popup in
properties window and it worked! however...it doesnt have "File" which i need
as the user upon looking at the result, needs to export it to excel.
so what is wrong here? or is there any code that i can use to make the
exporting to excel automatically; i will need the form to prompt the user for
a name and directory to save to.
several forms, the main form with command buttons that leads to other forms
where users can key in their conditions for queries, i.e. parameter forms
After building the SQL string using createquerydefs
i use the code:
DoCmd.OpenQuery "Requests_open_module", acViewNormal
to open the query.
all these is assigned to a command button on click event. however when i
click on the button in form view, the query result appears in a window behind
the parameter form instead of on top of it.
so i tried:
DoCmd.OpenForm "weekly_open_requests_result", acFormDS, , ,
acFormPropertySettings, acWindowNormal
where weekly_open_requests_result is a form linked to the
Requests_open_module query. And i get the same result, upon clicking, the
form appears at the back instead of on top.
finally i went to the weekly_open_requests_result form and enabled popup in
properties window and it worked! however...it doesnt have "File" which i need
as the user upon looking at the result, needs to export it to excel.
so what is wrong here? or is there any code that i can use to make the
exporting to excel automatically; i will need the form to prompt the user for
a name and directory to save to.