I have a form set up that queries a table and then outputs to excel but having a little block with coding.
i have
private sub fljan11_click()
docmd.openquery "fljan11"
****need some while the query is open perform this function*****
I have the function portion as
Set objXLApp = CreateObject("Excel.Application")
Set objXLBook = objXLApp.Workbooks.Open("path for .xls")
objXLApp.Application.Visible = True
With objXLBook.ActiveSheet
Set r = .usedRange
i = r.Rows.Count + 1
.cells(i + 1, 1).value = me.pol
.cells(i + 1, 1).value = me.customer
***code for excel goes on. I know the code is no issue for the excel output it is just getting a dowhile that query is open or running write to the excel.
thanks....