Ayo,
Since you are explicitly setting the Format of the combobox for the "1"
case, you probably should also be setting it for the "2" case. I guess
it would be:
Me.cmbProjectNumber.Format = "General Number"
But is that when you get the error message, when you click the
frmSelectLevel? Or what is frmSelectLevel? If it is an Option Group,
it would be better to have this code on its After Update event rather
than the Click event.
Another option you might consider, instead of trying to toggle the
properties of a single combobox to serve 2 such different functions,
would be to make 2 separate comboboxes, and then your code on the
frmSelectLevel would simply toggle their Visible property.
--
Steve Schapel, Microsoft Access MVP
Ayo wrote:
> Here is the code:
|