Hi all,
I'm not sure if this can be done with the expression builder. I have a query that brings in a value from an open form when run. The query can be called from two seperate forms.
In my expression, I would like to check which form is open, and port the corresponding value.
In VBA -
If IsOpen(frmPSWork) Then
MyVar = Forms!frmPSWork!txtID
Else
MyVar = Forms!frmCSupdate!txtID
End If
In the expression I tried playing around with something simple along these lines without success -
IIf(IsEmpty([Forms]![frmPSWork]![txtID]),([Forms]![frmCSupdate]![txtID]),([Forms]![frmPSWork]![txtID]))
Please help!
Thanks
Rob
I'm not sure if this can be done with the expression builder. I have a query that brings in a value from an open form when run. The query can be called from two seperate forms.
In my expression, I would like to check which form is open, and port the corresponding value.
In VBA -
If IsOpen(frmPSWork) Then
MyVar = Forms!frmPSWork!txtID
Else
MyVar = Forms!frmCSupdate!txtID
End If
In the expression I tried playing around with something simple along these lines without success -
IIf(IsEmpty([Forms]![frmPSWork]![txtID]),([Forms]![frmCSupdate]![txtID]),([Forms]![frmPSWork]![txtID]))
Please help!
Thanks
Rob