B
Beetle
I'm hoping for some input from some of you Access gurus out there. I have a
form that includes two unbound combo boxes, cboOperators an cboWells. They
select info from tblOperators (PK is OperatorID) and tblWells (PK is WellID)
respectively. Each has a not in list event to add new values.
The problem is that cboWells is filtered based on the selection in
cboOperators. If a new well name is entered in cboWells, I want to check it
against the entire recordset of tblWells, not just the filtered records, in
case the name is assigned to another Operator. I don't want to set the
WellName field in the table to No Duplicates. I thought of using DCount to
see if a record exists in the table, but in addition to finding if a record
exists, I also want to be able to tell the user which Operator it is assigned
to. Then I would generate a message like;
"The well name you entered already exists but is assigned to Operator A. Do
you want to add this well name for Operator B also?"
I'll probably figure out a way to do it, but I tend to overcode sometimes,
so I was just hoping for some ideas on how some of you might do it.
Hopefully this makes sense and I'm not just babbling like a fool.
(is it still considered babbling if you're typing and not actually speaking?)
Thanks in advance for any advice.
form that includes two unbound combo boxes, cboOperators an cboWells. They
select info from tblOperators (PK is OperatorID) and tblWells (PK is WellID)
respectively. Each has a not in list event to add new values.
The problem is that cboWells is filtered based on the selection in
cboOperators. If a new well name is entered in cboWells, I want to check it
against the entire recordset of tblWells, not just the filtered records, in
case the name is assigned to another Operator. I don't want to set the
WellName field in the table to No Duplicates. I thought of using DCount to
see if a record exists in the table, but in addition to finding if a record
exists, I also want to be able to tell the user which Operator it is assigned
to. Then I would generate a message like;
"The well name you entered already exists but is assigned to Operator A. Do
you want to add this well name for Operator B also?"
I'll probably figure out a way to do it, but I tend to overcode sometimes,
so I was just hoping for some ideas on how some of you might do it.
Hopefully this makes sense and I'm not just babbling like a fool.
(is it still considered babbling if you're typing and not actually speaking?)
Thanks in advance for any advice.