I have the following problem. In one of my forms (say FORM1) in ACCESS 2003, I have 3 toggle buttons which are inside a frame. Close to each of these buttons is a combox with a list of items. All the 3 comboxes correspond to 3 different categories (each list encircles one category) and are inside a TabControl (say TabCnt0). When the toggle button is pressed, the nearby list is shown (visible) and is available for the selection of the desired items, while the other two comboxes are then hidden.
Everything works perfectly, except that one pretty annoying thing happens. Immediately after the form is opened, all the 3 comboxes are visible. As soon as you click on one of the toggle buttons or on the frame, the two unselected comboxes disappear (as it should be) but if you reopen the form again, the same problem happens. I tries several ways to "refresh" somehow the form when it opens but without success. Does anybody know how to make it work so that whenever I open the form I see only one of the 3 choices?
Thanks in advance.
Marcin
PS The code I'm using right now is below:
Expand|Select|Wrap|Line Numbers
- Private Sub Frame5_Click()
- DoCmd.RunCommand acCmdRefresh
- Select Case Frame5
- Case 1
- CmbAssClass.Visible = True
- CmbReg.Visible = False
- CmbAssClassReg1.Visible = False
- CmbAssClassReg2.Visible = False
- Case 2
- CmbAssClass.Visible = False
- CmbReg.Visible = True
- CmbAssClassReg1.Visible = False
- CmbAssClassReg2.Visible = False
- Case 3
- CmbAssClass.Visible = False
- CmbReg.Visible = False
- CmbAssClassReg1.Visible = True
- CmbAssClassReg2.Visible = True
- End Select
- End Sub