Kamis, 01 September 2016

[MS_AccessPros] Re: Runtime Error 3011 "Cannot find the object..."

 

Bill,

You are on the right track. I went back and looked at another procedure I wrote that is working and I changed the line to this:

DoCmd.TransferSpreadsheet acExport, 10, "qryRebrandExport", strFileName

I left out the acExport in the previous one, I think that was causing the 3011 error. The version affected what error messages I was getting when I tried to open the spreadsheet but this one works. Thanks for pointing me in the right direction.

Doyce

---In MS_Access_Professionals@yahoogroups.com, <wrmosca@...> wrote :

Doyce - While it's complaining about the path it just might be the excel version argument. Replace 10 with the actual enum type. In my case using Office 2010 it's acSpreadsheetTypeExcel12

Using the literal argument instead of its numeric value is usually a safer bet because those stay the same through version changes while numerics could change.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

 


---In MS_Access_Professionals@yahoogroups.com, <winberry.doyce@...> wrote :

Hello Pros,

I am trying to export a query to a shared network folder. My procedure errors with error 3011 "The Microsoft database engine could not find the object \\RSIPRFP001\Accounting\Accnting\2016 Month End\2016 H August\LTL Rebrand Trailers.xlsx which is the file name I'm trying to save. The procedure errors on the line that says "DoCmd.TransferSpreadsheet.. The file path is correct. Here is the procedure:

Private Sub btnLTLRebrandExport_Click()
'Exports Rebranded trailer info to Excel
   
    Dim Spath As String
    Dim SMonth As String
    Dim StrMonthValue As String
    Dim strFileName As String
    Dim strSQL As String
    Dim qd As DAO.QueryDef
    Set qd = CurrentDb.QueryDefs("qryRebrandExport")
   
    strSQL = "SELECT ReconPRIMARYTABLE.CUSTID, ReconPRIMARYTABLE.UNITID, ReconPRIMARYTABLE.Door, ReconPRIMARYTABLE.CompletionDate, IIf([CUSTID]=""CTS"",334,378) AS Price, IIf([CUSTID]=""CTS"",125,0) AS Delivery, IIf([Door]=True,275,0) AS DoorPrice, [price]+[Delivery]+[DoorPrice] AS TotalPrice, Round([TotalPrice]*0.095,2) AS SalesTax, [TotalPrice]+[SalesTax] AS Total " & vbCrLf & _
             "FROM ReconPRIMARYTABLE " & vbCrLf & _
             "WHERE (((ReconPRIMARYTABLE.CUSTID)=""CTS"") AND ((ReconPRIMARYTABLE.CompletionDate) Between #" & Me.Start_Date & "# And #" & Me.End_Date & "#));"
    qd.SQL = strSQL
   
    ' Creates LTLRebrandSMonth.xlsx in n:\Accnting\month end folder
    'Check for EOM Year folder if not there, create it.
    If Len(Dir("\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End", vbDirectory)) = 0 Then
        'Make directory
        MkDir "\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End"

    End If
    'Check for EOM Month folder, if not there, create it.
    'First create SMonth which is the variable name of the monthly folder

   

    'Calculate SMonth
    StrMonthValue = DatePart("m", Me.Start_Date)
    Select Case StrMonthValue

    Case 1
        SMonth = "A January"
    Case 2
        SMonth = "B February"
    Case 3
        SMonth = "C March"
    Case 4
        SMonth = "D April"
    Case 5
        SMonth = "E May"
    Case 6
        SMonth = "F June"
    Case 7
        SMonth = "G July"
    Case 8
        SMonth = "H August"
    Case 9
        SMonth = "I September"
    Case 10
        SMonth = "J October"
    Case 11
        SMonth = "K November"
    Case Else
        SMonth = "L December"

    End Select

    'check for monthly folder, if not there, create it.
    If Len(Dir("\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End\" & DatePart("yyyy", Date) & " " & SMonth, vbDirectory)) = 0 Then
        'Make directory
        MkDir "\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End\" & DatePart("yyyy", Date) & " " & SMonth
    End If

    Spath = "\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End\" & DatePart("yyyy", Date) & " " & SMonth & "\"
    'strFileName = Spath & "LTL_Rebrand_" & Mid(SMonth, 3, 3) & DatePart("yyyy", Me.Start_Date) & ".xlsx"
    strFileName = Spath & "LTL Rebrand Trailers.xlsx"
    'Debug.Print strSQL
   
    'DoCmd.TransferSpreadsheet , acExport, 10, strSQL, strFileName
    Debug.Print Spath
    Debug.Print strFileName
    If FileExists(strFileName) = True Then Kill strFileName
    'DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel12, "qryRebrandExport", strFileName
    DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel12, "qryRebrandExport", "\\rsiprfp001\Accounting\ACCNTING\2016 Month End\2016 H August\LTL Rebrand Trailers.xlsx"
    DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel12, "qryRebrandExport", "C:\databases\LTL Rebrand Trailers.xlsx"
    Set qd = Nothing
    
   

End Sub


The part that checks for the path and creates the folder if needed works fine. I've tested it and used it in other procedures. I just can't get the query to transfer.


Doyce

__._,_.___

Posted by: winberry.doyce@con-way.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] Re: Runtime Error 3011 "Cannot find the object..."

 

Doyce - While it's complaining about the path it just might be the excel version argument. Replace 10 with the actual enum type. In my case using Office 2010 it's acSpreadsheetTypeExcel12


Using the literal argument instead of its numeric value is usually a safer bet because those stay the same through version changes while numerics could change.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

 


---In MS_Access_Professionals@yahoogroups.com, <winberry.doyce@con-way.com> wrote :

Hello Pros,

I am trying to export a query to a shared network folder. My procedure errors with error 3011 "The Microsoft database engine could not find the object \\RSIPRFP001\Accounting\Accnting\2016 Month End\2016 H August\LTL Rebrand Trailers.xlsx which is the file name I'm trying to save. The procedure errors on the line that says "DoCmd.TransferSpreadsheet.. The file path is correct. Here is the procedure:

Private Sub btnLTLRebrandExport_Click()
'Exports Rebranded trailer info to Excel
   
    Dim Spath As String
    Dim SMonth As String
    Dim StrMonthValue As String
    Dim strFileName As String
    Dim strSQL As String
    Dim qd As DAO.QueryDef
    Set qd = CurrentDb.QueryDefs("qryRebrandExport")
   
    strSQL = "SELECT ReconPRIMARYTABLE.CUSTID, ReconPRIMARYTABLE.UNITID, ReconPRIMARYTABLE.Door, ReconPRIMARYTABLE.CompletionDate, IIf([CUSTID]=""CTS"",334,378) AS Price, IIf([CUSTID]=""CTS"",125,0) AS Delivery, IIf([Door]=True,275,0) AS DoorPrice, [price]+[Delivery]+[DoorPrice] AS TotalPrice, Round([TotalPrice]*0.095,2) AS SalesTax, [TotalPrice]+[SalesTax] AS Total " & vbCrLf & _
             "FROM ReconPRIMARYTABLE " & vbCrLf & _
             "WHERE (((ReconPRIMARYTABLE.CUSTID)=""CTS"") AND ((ReconPRIMARYTABLE.CompletionDate) Between #" & Me.Start_Date & "# And #" & Me.End_Date & "#));"
    qd.SQL = strSQL
   
    ' Creates LTLRebrandSMonth.xlsx in n:\Accnting\month end folder
    'Check for EOM Year folder if not there, create it.
    If Len(Dir("\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End", vbDirectory)) = 0 Then
        'Make directory
        MkDir "\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End"

    End If
    'Check for EOM Month folder, if not there, create it.
    'First create SMonth which is the variable name of the monthly folder

   

    'Calculate SMonth
    StrMonthValue = DatePart("m", Me.Start_Date)
    Select Case StrMonthValue

    Case 1
        SMonth = "A January"
    Case 2
        SMonth = "B February"
    Case 3
        SMonth = "C March"
    Case 4
        SMonth = "D April"
    Case 5
        SMonth = "E May"
    Case 6
        SMonth = "F June"
    Case 7
        SMonth = "G July"
    Case 8
        SMonth = "H August"
    Case 9
        SMonth = "I September"
    Case 10
        SMonth = "J October"
    Case 11
        SMonth = "K November"
    Case Else
        SMonth = "L December"

    End Select

    'check for monthly folder, if not there, create it.
    If Len(Dir("\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End\" & DatePart("yyyy", Date) & " " & SMonth, vbDirectory)) = 0 Then
        'Make directory
        MkDir "\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End\" & DatePart("yyyy", Date) & " " & SMonth
    End If

    Spath = "\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End\" & DatePart("yyyy", Date) & " " & SMonth & "\"
    'strFileName = Spath & "LTL_Rebrand_" & Mid(SMonth, 3, 3) & DatePart("yyyy", Me.Start_Date) & ".xlsx"
    strFileName = Spath & "LTL Rebrand Trailers.xlsx"
    'Debug.Print strSQL
   
    'DoCmd.TransferSpreadsheet , acExport, 10, strSQL, strFileName
    Debug.Print Spath
    Debug.Print strFileName
    If FileExists(strFileName) = True Then Kill strFileName
    'DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel12, "qryRebrandExport", strFileName
    DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel12, "qryRebrandExport", "\\rsiprfp001\Accounting\ACCNTING\2016 Month End\2016 H August\LTL Rebrand Trailers.xlsx"
    DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel12, "qryRebrandExport", "C:\databases\LTL Rebrand Trailers.xlsx"
    Set qd = Nothing
    
   

End Sub


The part that checks for the path and creates the folder if needed works fine. I've tested it and used it in other procedures. I just can't get the query to transfer.


Doyce

__._,_.___

Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] Runtime Error 3011 "Cannot find the object..."

 

Hello Pros,

I am trying to export a query to a shared network folder. My procedure errors with error 3011 "The Microsoft database engine could not find the object \\RSIPRFP001\Accounting\Accnting\2016 Month End\2016 H August\LTL Rebrand Trailers.xlsx which is the file name I'm trying to save. The procedure errors on the line that says "DoCmd.TransferSpreadsheet.. The file path is correct. Here is the procedure:

Private Sub btnLTLRebrandExport_Click()
'Exports Rebranded trailer info to Excel
   
    Dim Spath As String
    Dim SMonth As String
    Dim StrMonthValue As String
    Dim strFileName As String
    Dim strSQL As String
    Dim qd As DAO.QueryDef
    Set qd = CurrentDb.QueryDefs("qryRebrandExport")
   
    strSQL = "SELECT ReconPRIMARYTABLE.CUSTID, ReconPRIMARYTABLE.UNITID, ReconPRIMARYTABLE.Door, ReconPRIMARYTABLE.CompletionDate, IIf([CUSTID]=""CTS"",334,378) AS Price, IIf([CUSTID]=""CTS"",125,0) AS Delivery, IIf([Door]=True,275,0) AS DoorPrice, [price]+[Delivery]+[DoorPrice] AS TotalPrice, Round([TotalPrice]*0.095,2) AS SalesTax, [TotalPrice]+[SalesTax] AS Total " & vbCrLf & _
             "FROM ReconPRIMARYTABLE " & vbCrLf & _
             "WHERE (((ReconPRIMARYTABLE.CUSTID)=""CTS"") AND ((ReconPRIMARYTABLE.CompletionDate) Between #" & Me.Start_Date & "# And #" & Me.End_Date & "#));"
    qd.SQL = strSQL
   
    ' Creates LTLRebrandSMonth.xlsx in n:\Accnting\month end folder
    'Check for EOM Year folder if not there, create it.
    If Len(Dir("\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End", vbDirectory)) = 0 Then
        'Make directory
        MkDir "\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End"

    End If
    'Check for EOM Month folder, if not there, create it.
    'First create SMonth which is the variable name of the monthly folder

   

    'Calculate SMonth
    StrMonthValue = DatePart("m", Me.Start_Date)
    Select Case StrMonthValue

    Case 1
        SMonth = "A January"
    Case 2
        SMonth = "B February"
    Case 3
        SMonth = "C March"
    Case 4
        SMonth = "D April"
    Case 5
        SMonth = "E May"
    Case 6
        SMonth = "F June"
    Case 7
        SMonth = "G July"
    Case 8
        SMonth = "H August"
    Case 9
        SMonth = "I September"
    Case 10
        SMonth = "J October"
    Case 11
        SMonth = "K November"
    Case Else
        SMonth = "L December"

    End Select

    'check for monthly folder, if not there, create it.
    If Len(Dir("\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End\" & DatePart("yyyy", Date) & " " & SMonth, vbDirectory)) = 0 Then
        'Make directory
        MkDir "\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End\" & DatePart("yyyy", Date) & " " & SMonth
    End If

    Spath = "\\rsiprfp001\Accounting\ACCNTING\" & DatePart("yyyy", Date) & " Month End\" & DatePart("yyyy", Date) & " " & SMonth & "\"
    'strFileName = Spath & "LTL_Rebrand_" & Mid(SMonth, 3, 3) & DatePart("yyyy", Me.Start_Date) & ".xlsx"
    strFileName = Spath & "LTL Rebrand Trailers.xlsx"
    'Debug.Print strSQL
   
    'DoCmd.TransferSpreadsheet , acExport, 10, strSQL, strFileName
    Debug.Print Spath
    Debug.Print strFileName
    If FileExists(strFileName) = True Then Kill strFileName
    'DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel12, "qryRebrandExport", strFileName
    DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel12, "qryRebrandExport", "\\rsiprfp001\Accounting\ACCNTING\2016 Month End\2016 H August\LTL Rebrand Trailers.xlsx"
    DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel12, "qryRebrandExport", "C:\databases\LTL Rebrand Trailers.xlsx"
    Set qd = Nothing
    
   

End Sub


The part that checks for the path and creates the folder if needed works fine. I've tested it and used it in other procedures. I just can't get the query to transfer.


Doyce

__._,_.___

Posted by: winberry.doyce@con-way.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[belajar-access] Menampilkan Caption

 

Mohon pencerahan,

 

Tabel saya sudah diberi field property Caption supaya saat table dibuka judul kolom akan menayangkan Caption yang dibuat.

 

Yang mau saya tanyakan, bagaimana Caption ini tetap muncul pada Query yang fieldnya memiliki Expression?

 

Seperti

Untuk field AirTemp , Captionnya = Air Temperatur (C), kemudian saya buat Query

“AirTemp_: IIf([AirTemp]=-9999,[AirTemp],[AirTemp]/10)”

Saya tidak ingin mengetik ulang nama field baru atau Caption, saya ingin dia tetap menampilkan Caption yang saya buat pada table.

 

Terima kasih

__._,_.___

Posted by: "Zakirman Ibros" <zibros1@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

SPAM IS PROHIBITED

.

__,_._,___

[belajar-access] File - Tata Tertib dan Aturan.txt

 


Tata tertib dan peraturan
Mailing List: belajar-access@yahoogroups.com

1. Mailing list ini membahas mengenai pemrograman Microsoft Access.
2. Tidak diperkenankan mem-posting topik yang tidak ada kaitannya sama sekali dengan pemrograman MS Access, peluang kerja atau tawaran kerja sama dengan keahlian di bidang MS Access, atau pengajaran/kursus MS Acces. Pelanggaran terhadap aturan ini akan di-ban dari keanggotaan milis ini.
3. Mohon berdiskusi dengan baik, dengan semangat membangun, demi kemajuan kita bersama. Hindarilah perbantahan (flame) yang bisa menjadi pertengkaran yang tidak perlu.
4 Hindari reply permintaan one-liner seperti 'saya minta juga dong', 'saya setuju', dan lain-lain yang tidak perlu.
5. Sedapat mungkin memberikan data-data yang lengkap dalam mengajukan suatu masalah untuk memudahkan rekan-rekan sesama member mengidentifikasi dan mencarikan solusi, termasuk memberikan subject yang sesuai dengan isi email, tidak dengan kata-kata seperti "tologing dong", "pusing...", "ada yang bisa bantu..", dll.

Moderator

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (114)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

SPAM IS PROHIBITED

.

__,_._,___

[AccessDevelopers] File - Monthly_Notices.txt

 


Monthly notices:

Hi Kids!:

Don't forget to check out our "Links" section at the website for helpful sites. Also take a peek at books that others have found worthwhile in our books database under the 'Database' link of the main AccessDevelopers page. Feel free to add any books or links that you have found useful.

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (146)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


Please zip all files prior to uploading to Files section.

.

__,_._,___

[belajar-access] Fwd: Undangan Ebiz Solution Day - 14 September 2016

 



---------- Forwarded message ----------
From: M. Choirul Amri (MCA) <choirul@gmail.com>
Date: Wednesday, 31 August 2016
Subject: Undangan Ebiz Solution Day - 14 September 2016
To: Haer Talib <haertalib@gmail.com>


Dear Mas Haer,

Mohonbantuannya untuk sebarkan undangan di bawah ke rekan-rekan komunitas Access :)

===================================================================

Dear Rekan-rekan IT Pro dan Developer

PT. Ebiz Cipta Solusi bekerjasama dengan SQL Server-Indo, SharePointClub-ID, dan Microsoft mengundang anda untuk menghadiri event Ebiz Solution Day yang akan kami diadakan pada:

Hari/Tanggal : Rabu, 14 September 2016 
Waktu : 12.00 – 17.00
Lokasi : Balai Kartini, Jakarta

Note: Registration & Lunch dimulai jam 11.30. Mohon kehadirannya tepat waktu.


Detail agenda dan pendaftaran online dapat dilihat di sini:

http://info.nintex.com/EBiz-SolutionDay-Sep2016_LP-Register.html 


Pendaftaran dapat juga dilakukan via email ke nita@ebizcipta.com dengan menyebutkan nama, nama perusahaan, dan no. telepon.

Telp : +62 21 2128 3068
Telp : +62 21 2128 3069

Besar harapan kami agar bapak/ibu dapat menghadiri event kami.







--


Haer Talib

RumahAccess Indonesia
Tempatnya Belajar Microsoft Access
Artikel | Forum | Milis | Download | Training | Links | Blog | Event



__._,_.___

Posted by: Haer Talib <haertalib@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

SPAM IS PROHIBITED

.

__,_._,___