In an effort to simplify the number of queries, tables, and forums I have in my database, I would like to see if I can use the same form for a task that would change depending on which form was open.
The current code is below.
=(DLookUp("[NumberofUnits]","[tblExpense]","[ProjectExpenseTrackingID]=" & [Forms]![frmExpense_Actual]![ProjectExpenseTrackingID])-(DSum("[NumberofUnits]","[tblSplitExpense]")))
To keep things simple, what I am looking to do is something like this:
DLookUp("[ExampleField]","[Table]","[Criteria]=" & [Forms]![frmExample]![ExampleField] OR[Forms]![frmExample2]![ExampleField2]
The criteria would check to see which form is open. Obviously this isn't working. Any suggestions?