im having issues with getting a value from one table for use in another.
for instance im creating an invoice, i have a table with all the products listed in it, with columns description and Price, which i need to get information from those in a Line Items Table.
i have a data macro set up, but when i select the product i want, the data doesnt fill, it just fives me the algorithm used to call the requested data.
The txt/field box is filled with: [ReturnVars]![retDefaultUnitPrice]
Here is the Macros i have:
*NAMED MACRO - LineItemCodes.GetDetails
Parameter Name:
prmLineaItemCodeID
SetReturnVar
Name: retDefaultUnitPrice
Expression = 0
SetReturnVar
Name: retDefaultDescription
Espression = ""
SetReturnVar
Name: retDiscontinued
Espression = True
Look up a Record In SELECT LineItemCodes.ID, LineItemCodes.DefaultUnitPrice, LineItemCodes.DefaultDescription, LineItemCodes.Discontinued FROM LineItemCodes;
Where Condition = [ID]=[prmLineItemCodeID]
SetReturnVar
Name: retDefaultUnitPrice
Expression = [DefaultUnitPrice]
SetReturnVar
Name: retDefaultDescription
Expression = [DefaultDescription]
SetReturnVar
Name: retDiscontinued
Expression = [Discontinued]
----------------------------------------------------
*AFTER UPDATE - Embedded Macro*
RunDataMacro
Macro Name: LineItemCodes.GetDetails
Parameters
prmLineItemCodeID = [cboProductID]
SetProperty
Control Name: txtUnitPrice
Property - Value
Value = [ReturnVars]![retDefaultUnitPrice]
SetProperty
Control Name: txtDescription
Property - Value
Value = [ReturnVars]![retDefaultDescription]
SetProperty
Control Name: txtQuantity
Property - Value
Value = 0