<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forum.4penny.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Microsoft Access</title><subtitle type="html">Tricks and Tips for Microsoft Access</subtitle><id>http://forum.4penny.net/blogs/microsoft_access/atom.aspx</id><link rel="alternate" type="text/html" href="http://forum.4penny.net/blogs/microsoft_access/default.aspx" /><link rel="self" type="application/atom+xml" href="http://forum.4penny.net/blogs/microsoft_access/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20611.960">Community Server</generator><updated>2008-07-29T14:39:00Z</updated><entry><title>VBA ADODB Frequent Error with adDate or adDBdate parameter </title><link rel="alternate" type="text/html" href="http://forum.4penny.net/blogs/microsoft_access/archive/2008/11/14/vba-adodb-frequent-error-with-addate-or-addbdate-parameter.aspx" /><id>http://forum.4penny.net/blogs/microsoft_access/archive/2008/11/14/vba-adodb-frequent-error-with-addate-or-addbdate-parameter.aspx</id><published>2008-11-14T17:56:00Z</published><updated>2008-11-14T17:56:00Z</updated><content type="html">&lt;p&gt;using &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="3"&gt;[code language=’vb’]&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;cmd.Parameters.Append cmd.CreateParameter(&amp;quot;@dtDate&amp;quot;, adDate, adParamInput, 0, &amp;quot;11/13/2008&amp;quot;) &lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;&lt;font face="Calibri" size="3"&gt;[/code]&lt;/font&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;&lt;font face="Calibri" size="3"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 0pt;mso-margin-top-alt:auto;"&gt;it would return this error:&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&amp;quot;Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.&amp;quot;&lt;/p&gt;
&lt;p&gt;Fix by using &lt;u&gt;adDBTimeStamp&lt;/u&gt;&lt;/p&gt;&lt;img src="http://forum.4penny.net/aggbug.aspx?PostID=1381" width="1" height="1"&gt;</content><author><name>Crystal</name><uri>http://forum.4penny.net/members/Crystal.aspx</uri></author></entry><entry><title>Stock report opening code for Access</title><link rel="alternate" type="text/html" href="http://forum.4penny.net/blogs/microsoft_access/archive/2008/07/29/stock-report-opening-code-for-access.aspx" /><id>http://forum.4penny.net/blogs/microsoft_access/archive/2008/07/29/stock-report-opening-code-for-access.aspx</id><published>2008-07-29T18:40:00Z</published><updated>2008-07-29T18:40:00Z</updated><content type="html">&lt;p&gt;I put the following code in all my Access reports &lt;/p&gt;
&lt;p&gt;&lt;pre style="overflow: scroll; background-color: #f2f2f2;"&gt; Option Explicit
Dim strCompanyID As String
Dim strFormName As String
Dim mlngBgColor As Long
Dim mintCount As Integer


Private Sub Report_Close()
    If isOpen(strFormName) Then
        DoCmd.Close acForm, strFormName
        DoCmd.Restore
    End If
End Sub


Private Sub Report_Open(Cancel As Integer)
    
    Dim strDatabase As String
    Dim strStartProject As String
    Dim strEndProject As String
    Dim strStartDate As String
    Dim strEndDate As String
    
    strFormName = "frmCostCatSummary"
    
    DoCmd.OpenForm strFormName, acNormal, , , , acDialog
    
    If isOpen(strFormName) Then
        DoCmd.Maximize
        
        strStartProject = Trim(Forms!frmCostCatSummary!cboStartProject)
        strEndProject = Trim(Nz(Forms!frmCostCatSummary!cboEndProject))
        strStartDate = Trim(Nz(Forms!frmCostCatSummary!txtDate1))
        strEndDate = Trim(Nz(Forms!frmCostCatSummary!txtDate2))
        
        strCompanyID = setDatabase("qryCostCatSummary", "sp_EP_CostCatSummary '" &amp; strStartProject &amp; "','" &amp; strEndProject &amp; "','" &amp; strStartDate &amp; "','" &amp; strEndDate &amp; "'")
        lblCompanyID.Caption = strCompanyID
    Else
        Cancel = True
    End If
End Sub&lt;/pre&gt;&lt;/p&gt;&lt;img src="http://forum.4penny.net/aggbug.aspx?PostID=1175" width="1" height="1"&gt;</content><author><name>Steve Gray</name><uri>http://forum.4penny.net/members/Steve-Gray.aspx</uri></author></entry><entry><title>IsOpen function for Access</title><link rel="alternate" type="text/html" href="http://forum.4penny.net/blogs/microsoft_access/archive/2008/07/29/isopen-function-for-access.aspx" /><id>http://forum.4penny.net/blogs/microsoft_access/archive/2008/07/29/isopen-function-for-access.aspx</id><published>2008-07-29T18:39:00Z</published><updated>2008-07-29T18:39:00Z</updated><content type="html">&lt;p&gt;&lt;pre style="overflow: scroll; background-color: #f2f2f2;"&gt;Public Function isOpen(strName As String, Optional intObjectType As Integer = acForm) As Boolean
On Error GoTo err_isOpen
        'Returns True if strName is open, False otherwise.
        'Assume the caller wants to kmow about a form.
        isOpen = (SysCmd(acSysCmdGetObjectState, intObjectType, strName) &lt;&gt; 0)
exit_isOpen:
    Exit Function
err_isOpen:
    MsgBox Err.Description
    Resume exit_isOpen
End Function&lt;/pre&gt;&lt;/p&gt;&lt;img src="http://forum.4penny.net/aggbug.aspx?PostID=1174" width="1" height="1"&gt;</content><author><name>Steve Gray</name><uri>http://forum.4penny.net/members/Steve-Gray.aspx</uri></author></entry></feed>