2

私はアクセス 2010 でノースウィンドのスタイルで注文システムを構築しようとしていますが、少し複雑ではありません! 製品がコンボボックスから選択されたときに、在庫から注文詳細サブフォームに製品の価格を表示する必要があるため、初心者なのでコードが正しく機能しません...

Private Sub Product_AfterUpdate()
Dim PriceX As Currency, UnitX As Currency
PriceX = DLookup("Unit Price", "ProductInventory", "[ProductInventory].[Product]=" & [Product].Value)
UnitX = DLookup("Unit", "ProductInventory", "[Product] =" & [Product].Value)
Unit_Price.Value = PriceX
Unit.Value = UnitX
End Sub
4

1 に答える 1