Advertisement
Advertisement
| 08.03.2008 at 10:34PM PDT, ID: 23618127 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: |
Public Sub doStoreInventory()
'declare and initiate required objects
Dim objConn As ADODB.Connection
Dim objRS
Dim blnUpdate
Dim rs As ADODB.Recordset
'=DATABASE CONNECTION
strDatabasePath = App.Path & "\" & "store.mdb"
Set objConn = CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDatabasePath
'=RECORDSET CONNECTION
Set objRS = objConn.Execute("select * from StoreInventory")
'=CONNECT WITH ATTRIBUTES TABLE
Set rs = New ADODB.Recordset
With rs
While Not (objRS.EOF Or objRS.BOF)
rs.Open "SELECT * FROM attributes WHERE ItemNo = '" & objRS("ItemNo") & "'", objConn, adOpenKeyset, adOpenDynamic, adLockOptimistic
blnUpdate = False
If Not IsNull(objRS("noSize")) Then
If Val(objRS("noSize")) > 0 Then
rs("noSize") = rs("noSize") + objRS("noSize")
blnUpdate = True
End If
End If
If Not IsNull(objRS("Size4")) Then
If Val(objRS("Size4")) > 0 Then
rs("Size4") = rs("Size4") + objRS("Size4")
blnUpdate = True
End If
If blnUpdate Then
rs.Update
End If
rs.Close
objRS.MoveNext
Wend
objRS.Close
Set objRS = Nothing
End With
End Sub
|