这是一个VBA代码,它从SQL数据库获取信息,然后将SKU与信息匹配。问题是一切都很快,直到这部分需要2分钟才能完成。任何帮助都会很棒。
'populate the Screen with the sku, desc, qty, UPC, and Made in Thailand
Do While Not (m_TagData_Table1.EOF)
A_I = m_TagData_Table1!Active
If gpMainList.Item("SKU_Select").Value = m_TagData_Table1.Fields(0) And A_I = 1 Then
With m_TagData_Table1
gpMainList.Item("SKU").Value = !SKU
gpMainList.Item("DESC").Value = !Description
gpMainList.Item("QUAN").Value = !Quantity
gpMainList.Item("UPC_Code").Value = ![UPC Code]
MIT = !Made_in
If MIT = 0 Then
gpMainList.Item("Made_In_Thailand").Value = False
Else
gpMainList.Item("Made_In_Thailand").Value = True
End If
End With
Exit Do
Else
m_TagData_Table1.MoveNext
End If
Loop