The objective is to populate the "OrderDetails" form / table with data from the "Services" & "Items" table.
I am able get data from the "Items" table with the below event:
Private Sub ItemID_AfterUpdate()
Me![Brand] = DLookup("Brand", "Items", "[ItemID] = " & Nz(Me.ItemID, 0))
End Sub
I can get the "Order Details" populated with the "Brand" with no issue.
When I try to obtain the price by entering the "ServiceNameID", I get the syntax error.
This is the event:
Private Sub ServiceNameID_AfterUpdate()
Me![Price] = DLookup("Price", "Services", "[ServiceNameID] = " & Nz(Me.ServiceNameID, 0))
End Sub
The format of the fields are all the same so not sure why it is not working.
See relationship file for the structure of the DataBase
thanks!
I am able get data from the "Items" table with the below event:
Private Sub ItemID_AfterUpdate()
Me![Brand] = DLookup("Brand", "Items", "[ItemID] = " & Nz(Me.ItemID, 0))
End Sub
I can get the "Order Details" populated with the "Brand" with no issue.
When I try to obtain the price by entering the "ServiceNameID", I get the syntax error.
This is the event:
Private Sub ServiceNameID_AfterUpdate()
Me![Price] = DLookup("Price", "Services", "[ServiceNameID] = " & Nz(Me.ServiceNameID, 0))
End Sub
The format of the fields are all the same so not sure why it is not working.
See relationship file for the structure of the DataBase
thanks!