If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
ComboBox won't re-appear
The following code causes my combo boxes to disappear option 2 is selected
which is correct, however the combo boxes do not reappear when option 1 is selected. thanks Alex If Frame13 = 2 Then Forms![frmUpload]![CmbVender].Visible = no Forms![frmUpload]![CmbTyp].Visible = no ElseIf Frame13 = 1 Then Forms![frmUpload]![CmbVender].Visible = yes Forms![frmUpload]![CmbTyp].Visible = yes Forms![frmUpload]![CmbVender].Requery Forms![frmUpload]![CmbTyp].Requery End If |
#2
|
|||
|
|||
ComboBox won't re-appear
Change all the yes to True and the No to False. Yes and No have no meaning
in VBA. "Alex" wrote: The following code causes my combo boxes to disappear option 2 is selected which is correct, however the combo boxes do not reappear when option 1 is selected. thanks Alex If Frame13 = 2 Then Forms![frmUpload]![CmbVender].Visible = no Forms![frmUpload]![CmbTyp].Visible = no ElseIf Frame13 = 1 Then Forms![frmUpload]![CmbVender].Visible = yes Forms![frmUpload]![CmbTyp].Visible = yes Forms![frmUpload]![CmbVender].Requery Forms![frmUpload]![CmbTyp].Requery End If |
#3
|
|||
|
|||
ComboBox won't re-appear
Hi Alex
Try this (I assume all the controls are on form "frmUpload") Private Sub FieldName_AfterUpdate() If Text2 = 2 Then Me.CmbVender.Visible = False Me.CmbTyp.Visible = False Else Me.CmbVender.Visible = True Me.CmbVender.Visible = True End If Me.Requery End Sub Change "FieldName" to the control that is being updated Hope this helps -- Buon Natale, Happy Chritmas. Wayne Manchester, England. Scusate,ma il mio Inglese fa schiffo :-) Percio se non ci siamo capiti, mi mandate un messagio e provero di spiegarmi meglio. "Alex" wrote: The following code causes my combo boxes to disappear option 2 is selected which is correct, however the combo boxes do not reappear when option 1 is selected. thanks Alex If Frame13 = 2 Then Forms![frmUpload]![CmbVender].Visible = no Forms![frmUpload]![CmbTyp].Visible = no ElseIf Frame13 = 1 Then Forms![frmUpload]![CmbVender].Visible = yes Forms![frmUpload]![CmbTyp].Visible = yes Forms![frmUpload]![CmbVender].Requery Forms![frmUpload]![CmbTyp].Requery End If |
#4
|
|||
|
|||
ComboBox won't re-appear
Sorry typeing error - should be (note the CmbTyp.Visible = True)
Private Sub FieldName_AfterUpdate() If Text2 = 2 Then Me.CmbVender.Visible = False Me.CmbTyp.Visible = False Else Me.CmbVender.Visible = True Me.CmbTyp.Visible = True End If Me.Requery End Sub -- Buon Natale, Happy Chritmas. Wayne Manchester, England. Scusate,ma il mio Inglese fa schiffo :-) Percio se non ci siamo capiti, mi mandate un messagio e provero di spiegarmi meglio. |
#5
|
|||
|
|||
ComboBox won't re-appear
Thank you - have a nice holiday
Alex "Alex" wrote: The following code causes my combo boxes to disappear option 2 is selected which is correct, however the combo boxes do not reappear when option 1 is selected. thanks Alex If Frame13 = 2 Then Forms![frmUpload]![CmbVender].Visible = no Forms![frmUpload]![CmbTyp].Visible = no ElseIf Frame13 = 1 Then Forms![frmUpload]![CmbVender].Visible = yes Forms![frmUpload]![CmbTyp].Visible = yes Forms![frmUpload]![CmbVender].Requery Forms![frmUpload]![CmbTyp].Requery End If |
Thread Tools | |
Display Modes | |
|
|