It's a simple Commission tracking application. There are Sales Reps, Expense Categories, Customers and Invoices.
On the Invoice, there are multiple Expenses (subform). Based on the Expense Category of the Expense, I need to pull in the Rate_Type and calculate the amount of the expense.
It seems that everything I do I get an "Improper Statement" error.
expense_row = Expense_Categories [ID == Invoice_Expenses.Expense_Category];
if(expense_row.Rate_Type == "Variable" )
{Invoice_Expenses.Quantity == input.Quantity};
else if(expense_row.Rate_Type == "Fixed" )
{Invoice_Expenses.Quantity = 1};
else if(expense_row.Rate_Type == "Formula" )
{Invoice_Expenses.Quantity = input.Quantity};