A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

ComboBox won't re-appear



 
 
Thread Tools Display Modes
  #1  
Old December 19th, 2006, 03:23 PM posted to microsoft.public.access.forms
ALEX
external usenet poster
 
Posts: 731
Default 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  
Old December 19th, 2006, 04:19 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default 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  
Old December 19th, 2006, 04:19 PM posted to microsoft.public.access.forms
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default 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  
Old December 19th, 2006, 04:28 PM posted to microsoft.public.access.forms
Wayne-I-M
external usenet poster
 
Posts: 3,674
Default 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  
Old December 19th, 2006, 04:28 PM posted to microsoft.public.access.forms
ALEX
external usenet poster
 
Posts: 731
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.