Morning all,
I need the ability for users to click a button in the dbase userform and that will select the current record only and save/export the current record to an excel sheet. (this I will then RunCmD to open a word doc merge).
This effectively will mailmerge ONLY the CURRENT Record.
I am struggling to get a working version but I have 2 dbases that use the components of what I want perfectly well.
- I can easily run a report selecting the current record
DoCmd.OpenReport "FrontSheet", , , "[ID] = " & Me![ID]
- I can easily export a dataset to excel
DoCmd.OutputTo acOutputReport, "WordExport", acFormatXLS, "C:\Output.xls"
But I cant seem to figure out how to effectively select the current record only and export it to excel.
any guidance would be great.
I need the ability for users to click a button in the dbase userform and that will select the current record only and save/export the current record to an excel sheet. (this I will then RunCmD to open a word doc merge).
This effectively will mailmerge ONLY the CURRENT Record.
I am struggling to get a working version but I have 2 dbases that use the components of what I want perfectly well.
- I can easily run a report selecting the current record
DoCmd.OpenReport "FrontSheet", , , "[ID] = " & Me![ID]
- I can easily export a dataset to excel
DoCmd.OutputTo acOutputReport, "WordExport", acFormatXLS, "C:\Output.xls"
But I cant seem to figure out how to effectively select the current record only and export it to excel.
any guidance would be great.