Private Sub CmdShipment_Click()
On Error GoTo Err_CmdShipment_Click

    Dim stDocName As String

    stDocName = "RptShipment"
    DoCmd.OpenReport stDocName, acPreview



    'aksan start:
    'Contoh dengan outputto excel based on recordsource sub form
    DoCmd.OutputTo acOutputQuery, Me.[QryShipmentDetail 
Subform].Form.RecordSource, acFormatXLS, "d:\projects\test.xls", True
    'aksan end -----


Exit_CmdShipment_Click:
    Exit Sub

Err_CmdShipment_Click:
    MsgBox Err.Description
    Resume Exit_CmdShipment_Click
    
End Sub





aksan kurdin


--- In [email protected], Cecep W <cepwa...@...> wrote:
>
> hallo pakar access semua,
> 
> saya punya report yg mana feild2 sbb:
> 
> Tgl      Nama_Barang     kondisi      jumlah     catatan
> 
> report ini saya ambil dari query.
> maslahnya adalah ketika saya export ke exel tampilan di exel-nya jadi
> acak-acakan tidak lagi berurutan field2nya itu seperti pada report.
> apa yang harus saya perbaiki?
> 
> saya inginya urutanya tetap :
>  Tgl      Nama_Barang     kondisi      jumlah     catatan
> 
> regards
> CW
>


Kirim email ke