Run-time error 2110

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i am using a2k.

i have developed a form onto which i have slapped a couple of unbound
controls wich allow users to input their values in order to get to a record
in the underlying table that requires updating/editing of some sort.

the user must enter EITHER the value of cbo_IRB *OR* cbo_Study after which
he must enter the value of cboReg2 OR cboReg1. to make the experience of
looking at the screen 'easier' i have superimposed the comboboxes cboReg2 and
cboReg1 so that what the user thinks he's doing is entering data into just
one cbobox. the control source for each is based upon a slightly different
SQL. pulling this off has found me encountering this 'Run-time error 2110'.
is there some way that i can implement this design. if not that, then i know
i can keep the pair of cboboxes in plain sight of each other (as in separate)
but i think it'd be 'neater' to use this approach.

any thought, anyone? the relevant VBa code is as under.


-ted


Private Sub cboIRB__AfterUpdate()
Me.cboReg2_.Enabled = True
Me.cboReg2_ = ""
Me.cboReg2_.Requery
Me.cboReg1_ = ""
Me.cboReg1_.Visible = False
Me.[cboStudy#] = ""
Me.cboReg2_.Enabled = True
Me.cboReg2_.SetFocus
End Sub

Private Sub cboStudy__AfterUpdate()
Me.cboReg1_.Enabled = True
Me.cboReg1_ = ""
Me.cboReg1_.Requery
Me.cboReg2_ = ""
Me.cboReg2_.Visible = False
Me.[cboIRB#] = ""
Me.[cboIRB#].Requery
Me.cboReg1_.Enabled = True
Me.cboReg1_.SetFocus
End Sub
 
Back
Top