<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=VbzCart%2Farchive%2Fcode%2FVBA%2FclsPackageItems</id>
	<title>VbzCart/archive/code/VBA/clsPackageItems - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://htyp.org/mw/index.php?action=history&amp;feed=atom&amp;title=VbzCart%2Farchive%2Fcode%2FVBA%2FclsPackageItems"/>
	<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=VbzCart/archive/code/VBA/clsPackageItems&amp;action=history"/>
	<updated>2026-06-25T17:45:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://htyp.org/mw/index.php?title=VbzCart/archive/code/VBA/clsPackageItems&amp;diff=28620&amp;oldid=prev</id>
		<title>Woozle at 12:49, 14 October 2022</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=VbzCart/archive/code/VBA/clsPackageItems&amp;diff=28620&amp;oldid=prev"/>
		<updated>2022-10-14T12:49:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:49, 14 October 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;syntaxhighlight lang=&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&lt;/del&gt;VB&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;&lt;/ins&gt;syntaxhighlight lang=VB&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039; CLASS: clsPackages&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039; CLASS: clsPackages&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
	<entry>
		<id>https://htyp.org/mw/index.php?title=VbzCart/archive/code/VBA/clsPackageItems&amp;diff=28619&amp;oldid=prev</id>
		<title>Woozle at 12:48, 14 October 2022</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=VbzCart/archive/code/VBA/clsPackageItems&amp;diff=28619&amp;oldid=prev"/>
		<updated>2022-10-14T12:48:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:48, 14 October 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;VB&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang=&lt;/ins&gt;&amp;lt;VB&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039; CLASS: clsPackages&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039; CLASS: clsPackages&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l100&quot;&gt;Line 100:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 100:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;    Set Create = objNew&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;    Set Create = objNew&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;End Function&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;End Function&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;VB&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
	<entry>
		<id>https://htyp.org/mw/index.php?title=VbzCart/archive/code/VBA/clsPackageItems&amp;diff=20370&amp;oldid=prev</id>
		<title>Woozle: Woozle moved page VbzCart/code/VBA/clsPackageItems to VbzCart/archive/code/VBA/clsPackageItems</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=VbzCart/archive/code/VBA/clsPackageItems&amp;diff=20370&amp;oldid=prev"/>
		<updated>2014-12-19T02:08:59Z</updated>

		<summary type="html">&lt;p&gt;Woozle moved page &lt;a href=&quot;/mw/index.php?title=VbzCart/code/VBA/clsPackageItems&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;VbzCart/code/VBA/clsPackageItems (page does not exist)&quot;&gt;VbzCart/code/VBA/clsPackageItems&lt;/a&gt; to &lt;a href=&quot;/VbzCart/archive/code/VBA/clsPackageItems&quot; title=&quot;VbzCart/archive/code/VBA/clsPackageItems&quot;&gt;VbzCart/archive/code/VBA/clsPackageItems&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:08, 19 December 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
	<entry>
		<id>https://htyp.org/mw/index.php?title=VbzCart/archive/code/VBA/clsPackageItems&amp;diff=19996&amp;oldid=prev</id>
		<title>Woozle: Created page with &quot;&lt;VB&gt; &#039; CLASS: clsPackages  Option Compare Database Option Explicit  Private rs As Recordset Private intAccessCount As Long Public Sub Init()     intAccessCount = 0     Set rs ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://htyp.org/mw/index.php?title=VbzCart/archive/code/VBA/clsPackageItems&amp;diff=19996&amp;oldid=prev"/>
		<updated>2014-05-08T00:49:01Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;VB&amp;gt; &amp;#039; CLASS: clsPackages  Option Compare Database Option Explicit  Private rs As Recordset Private intAccessCount As Long Public Sub Init()     intAccessCount = 0     Set rs ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;VB&amp;gt;&lt;br /&gt;
&amp;#039; CLASS: clsPackages&lt;br /&gt;
&lt;br /&gt;
Option Compare Database&lt;br /&gt;
Option Explicit&lt;br /&gt;
&lt;br /&gt;
Private rs As Recordset&lt;br /&gt;
Private intAccessCount As Long&lt;br /&gt;
Public Sub Init()&lt;br /&gt;
    intAccessCount = 0&lt;br /&gt;
    Set rs = Nothing&lt;br /&gt;
End Sub&lt;br /&gt;
Public Property Get Data() As Recordset&lt;br /&gt;
    Set Data = rs&lt;br /&gt;
End Property&lt;br /&gt;
Public Property Get Data_Items() As Recordset&lt;br /&gt;
&amp;#039;    Set Data_Items = CurrentDb.OpenRecordset(&amp;quot;qryPkgItems_Items&amp;quot;, dbOpenSnapshot)&lt;br /&gt;
    Set Data_Items = CurrentDb.OpenRecordset(&amp;quot;Package Items&amp;quot;, dbOpenSnapshot)&lt;br /&gt;
End Property&lt;br /&gt;
Public Sub DataOpen()&lt;br /&gt;
    If intAccessCount = 0 Then&lt;br /&gt;
        Set rs = CurrentDb.OpenRecordset(&amp;quot;Package Items&amp;quot;, dbOpenDynaset)&lt;br /&gt;
    End If&lt;br /&gt;
    intAccessCount = intAccessCount + 1&lt;br /&gt;
End Sub&lt;br /&gt;
Public Sub DataShut()&lt;br /&gt;
    intAccessCount = intAccessCount - 1&lt;br /&gt;
    If intAccessCount = 0 Then&lt;br /&gt;
        rs.Close&lt;br /&gt;
        Set rs = Nothing&lt;br /&gt;
    End If&lt;br /&gt;
End Sub&lt;br /&gt;
Public Property Get Item(iID As Long) As clsPackageItem&lt;br /&gt;
    Dim objItem As clsPackageItem&lt;br /&gt;
&lt;br /&gt;
    Me.DataOpen&lt;br /&gt;
    With Me.Data&lt;br /&gt;
        .FindFirst &amp;quot;ID=&amp;quot; &amp;amp; iID&lt;br /&gt;
        If .NoMatch Then&lt;br /&gt;
&amp;#039;            MsgBox &amp;quot;Package ID &amp;quot; &amp;amp; iID &amp;amp; &amp;quot; not found&amp;quot;, vbCritical, &amp;quot;Internal Error&amp;quot;&lt;br /&gt;
            Set objItem = Nothing&lt;br /&gt;
        Else&lt;br /&gt;
            Set objItem = New clsPackageItem&lt;br /&gt;
            objItem.Init .Fields&lt;br /&gt;
        End If&lt;br /&gt;
    End With&lt;br /&gt;
    Me.DataShut&lt;br /&gt;
    Set Item = objItem&lt;br /&gt;
End Property&lt;br /&gt;
Public Property Get Packings(iOrderItem As Long) As Scripting.Dictionary&lt;br /&gt;
&amp;#039; ACTION: returns a list of all packings of the given order item&lt;br /&gt;
    Dim strFilt As String&lt;br /&gt;
    Dim objList As Scripting.Dictionary&lt;br /&gt;
    Dim objItem As clsPackageItem&lt;br /&gt;
&lt;br /&gt;
    strFilt = &amp;quot;ID_OrderItem=&amp;quot; &amp;amp; iOrderItem&lt;br /&gt;
    Set objList = New Scripting.Dictionary&lt;br /&gt;
    Me.DataOpen&lt;br /&gt;
    With Me.Data&lt;br /&gt;
        .FindFirst strFilt&lt;br /&gt;
        Do Until .NoMatch&lt;br /&gt;
            Set objItem = New clsPackageItem&lt;br /&gt;
            objItem.Init .Fields&lt;br /&gt;
            objList.Add objItem, objItem.ID&lt;br /&gt;
            .FindNext strFilt&lt;br /&gt;
        Loop&lt;br /&gt;
    End With&lt;br /&gt;
    Me.DataShut&lt;br /&gt;
    Set Packings = objList&lt;br /&gt;
End Property&lt;br /&gt;
&amp;#039;Public Function Create(iOrder As Long) As clsPackage&lt;br /&gt;
&amp;#039;&amp;#039; ACTION: create a new package record/object&lt;br /&gt;
&amp;#039;    Dim objNew As clsPackage&lt;br /&gt;
&amp;#039;    Dim intCode As Long&lt;br /&gt;
&amp;#039;    Dim strFilt As String&lt;br /&gt;
&amp;#039;&lt;br /&gt;
&amp;#039;    Set objNew = New clsPackage&lt;br /&gt;
&amp;#039;    Me.DataOpen&lt;br /&gt;
&amp;#039;    With Me.Data&lt;br /&gt;
&amp;#039;        &amp;#039; find the highest used package code&lt;br /&gt;
&amp;#039;        strFilt = &amp;quot;ID_Order=&amp;quot; &amp;amp; iOrder&lt;br /&gt;
&amp;#039;        .FindFirst strFilt&lt;br /&gt;
&amp;#039;        Do Until .NoMatch&lt;br /&gt;
&amp;#039;            If intCode &amp;lt; !Seq Then&lt;br /&gt;
&amp;#039;                intCode = !Seq&lt;br /&gt;
&amp;#039;            End If&lt;br /&gt;
&amp;#039;            .FindNext strFilt&lt;br /&gt;
&amp;#039;        Loop&lt;br /&gt;
&amp;#039;        intCode = intCode + 1   &amp;#039; then increment it by one&lt;br /&gt;
&amp;#039;&lt;br /&gt;
&amp;#039;        &amp;#039; now create the new record&lt;br /&gt;
&amp;#039;        .AddNew&lt;br /&gt;
&amp;#039;        !ID_Order = iOrder&lt;br /&gt;
&amp;#039;        !Code = intCode&lt;br /&gt;
&amp;#039;        !WhenStarted = Now&lt;br /&gt;
&amp;#039;        .Update&lt;br /&gt;
&amp;#039;        objNew.Init .Fields&lt;br /&gt;
&amp;#039;    End With&lt;br /&gt;
&amp;#039;    Me.DataShut&lt;br /&gt;
&amp;#039;    Set Create = objNew&lt;br /&gt;
&amp;#039;End Function&lt;br /&gt;
&amp;lt;/VB&amp;gt;&lt;/div&gt;</summary>
		<author><name>Woozle</name></author>
	</entry>
</feed>