0

Exporting an access form to an excel file.

I have code which basically works, but enters all data in one row, instead of one column. Is this an easy fix?

Set fd = Application.FileDialog(msoFileDialogSaveAs)

If fd.Show Then
    Me.Filter = "[ID] = " & Me!ID
    Me.FilterOn = True
    DoCmd.OutputTo acOutputForm, "Checkride", "(*.xls)", fd.SelectedItems(1), True
    Me.FilterOn = False
End If

Separate question, based on the same code: If I simply enter a filename, this does not save the file as .xls file. I can type filename.xls, and it works, but that is not optimal. Is there something to change on the DoCmd line?

Robert Kendall
  • 368
  • 2
  • 9
  • 24

0 Answers0