N
NEWER USER
I have two unbound fields on a form that I use for Search boxes and two
subforms forms linked to its corresponding Search box. "Search" and "SearchJ"
and linked with Child Field (Number ID) and Master Field (Search) and Child
Field (JNumberID) and Master Field (SearchJ). On the After Update Event of
both Search boxes, the cursor moves to the respective subform anfd retrieves
the correct record. I would like to ELIMINATE one of the subforms and USING
CODE change the Child Fields and Master Fields based on which Search Box I am
using. I tried using IF statements in the Child/Master Fields and keep
getting syntax errors. I am not sure whether If statements are even allowed
or perhaps my wording is incorrect. Both Dearch Boxes and subforms are
overlapping each other on the Main Form and made visible using a checkbox for
the Search box used. So..
One one of the subform's properties
In the Child Fields row, I wrote
=If(frmOrder.Chkbox = -1, "NumberID","JNumberID")
In the Master Fields row, I wrote
=If(frmOrde.Chkbox = -1 "Search","SearchJ")
Syntax Errors - tried omitting the quotes and same error.
Can anyone suggest an alternative method or CODING that may resolve my
dilemna?
subforms forms linked to its corresponding Search box. "Search" and "SearchJ"
and linked with Child Field (Number ID) and Master Field (Search) and Child
Field (JNumberID) and Master Field (SearchJ). On the After Update Event of
both Search boxes, the cursor moves to the respective subform anfd retrieves
the correct record. I would like to ELIMINATE one of the subforms and USING
CODE change the Child Fields and Master Fields based on which Search Box I am
using. I tried using IF statements in the Child/Master Fields and keep
getting syntax errors. I am not sure whether If statements are even allowed
or perhaps my wording is incorrect. Both Dearch Boxes and subforms are
overlapping each other on the Main Form and made visible using a checkbox for
the Search box used. So..
One one of the subform's properties
In the Child Fields row, I wrote
=If(frmOrder.Chkbox = -1, "NumberID","JNumberID")
In the Master Fields row, I wrote
=If(frmOrde.Chkbox = -1 "Search","SearchJ")
Syntax Errors - tried omitting the quotes and same error.
Can anyone suggest an alternative method or CODING that may resolve my
dilemna?