PC Review


Reply
Thread Tools Rate Thread

Control don't desapear

 
 
gatarossi@ig.com.br
Guest
Posts: n/a
 
      7th Jul 2007
Dear all,

I'm getting crazy because this access!!!

I have a form called expenses and a subform linked with tge expenses
form called expenses_subform

In expenses_subform I have a textbox call period_1

When I open the expenses form I need that the textbox period_1 stay
invisible:

I put this code, but it doesn't work. Why?

Private Sub Form_Open(Cancel As Integer)

period_1.Visible = False

End Sub

Thanks

André.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWF1cmljZQ==?=
Guest
Posts: n/a
 
      7th Jul 2007
You don't have to set it to visible false in VBA on opening. You should set
the control property to visible = no and after that in code you have to set
it visble=true whenever appropriate (or when you decide it has te bo visbile
again).

--
Maurice Ausum


"(E-Mail Removed)" wrote:

> Dear all,
>
> I'm getting crazy because this access!!!
>
> I have a form called expenses and a subform linked with tge expenses
> form called expenses_subform
>
> In expenses_subform I have a textbox call period_1
>
> When I open the expenses form I need that the textbox period_1 stay
> invisible:
>
> I put this code, but it doesn't work. Why?
>
> Private Sub Form_Open(Cancel As Integer)
>
> period_1.Visible = False
>
> End Sub
>
> Thanks
>
> André.
>
>

 
Reply With Quote
 
gatarossi@ig.com.br
Guest
Posts: n/a
 
      7th Jul 2007
Dear Maurice

This didn't work too.

Now by luck I think I have discovered the right code:

Private Sub Form_Open(Cancel As Integer)

With Me
.period_1.ColumnHidden = True
End With

End Sub

I think because it's in a subform I need to hidde the column. I don't
known, but it's work!

Thanks for your help!!!

André

 
Reply With Quote
 
=?Utf-8?B?V2F5bmUtSS1N?=
Guest
Posts: n/a
 
      7th Jul 2007
Hi

Have another ook at the advice given by Maurice as it is correct. If you
really want to code the visible then use the OnLoad

Private Sub Form_Load()
Me.period_1.Visible = False
End Sub

Although as Maurice has said there is no need for this to be coded


--
Wayne
Manchester, England.



"(E-Mail Removed)" wrote:

> Dear Maurice
>
> This didn't work too.
>
> Now by luck I think I have discovered the right code:
>
> Private Sub Form_Open(Cancel As Integer)
>
> With Me
> .period_1.ColumnHidden = True
> End With
>
> End Sub
>
> I think because it's in a subform I need to hidde the column. I don't
> known, but it's work!
>
> Thanks for your help!!!
>
> André
>
>

 
Reply With Quote
 
Rick Brandt
Guest
Posts: n/a
 
      8th Jul 2007
(E-Mail Removed) wrote:
> Dear Maurice
>
> This didn't work too.
>
> Now by luck I think I have discovered the right code:
>
> Private Sub Form_Open(Cancel As Integer)
>
> With Me
> .period_1.ColumnHidden = True
> End With
>
> End Sub
>
> I think because it's in a subform I need to hidde the column. I don't
> known, but it's work!
>
> Thanks for your help!!!
>
> André


It has nothing to do with being a subform. It is because you are using
datasheet view. What you do to the controls you see in design view has little
to do with what happens in datasheet view.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


 
Reply With Quote
 
=?Utf-8?B?TWF1cmljZQ==?=
Guest
Posts: n/a
 
      8th Jul 2007
When andre mentioned hiding the column it came to mind that he was indeed
using datasheetview. Well as we saw he provided his own solution.
--
Maurice Ausum


"Rick Brandt" wrote:

> (E-Mail Removed) wrote:
> > Dear Maurice
> >
> > This didn't work too.
> >
> > Now by luck I think I have discovered the right code:
> >
> > Private Sub Form_Open(Cancel As Integer)
> >
> > With Me
> > .period_1.ColumnHidden = True
> > End With
> >
> > End Sub
> >
> > I think because it's in a subform I need to hidde the column. I don't
> > known, but it's work!
> >
> > Thanks for your help!!!
> >
> > André

>
> It has nothing to do with being a subform. It is because you are using
> datasheet view. What you do to the controls you see in design view has little
> to do with what happens in datasheet view.
>
> --
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt at Hunter dot com
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Desapear Mandy Microsoft Excel Crashes 0 25th Mar 2008 01:31 PM
Calender does not desapear =?Utf-8?B?bWFwZXJhbGlh?= Microsoft Excel Misc 9 15th Jun 2007 07:33 PM
Directory/folder desapear... =?Utf-8?B?Sko=?= Windows XP General 0 20th Sep 2006 12:17 AM
Folder desapear... =?Utf-8?B?Sko=?= Windows XP Accessibility 0 19th Sep 2006 10:23 PM
help please, my antivirus icon desapear Betty Windows XP General 2 15th Jun 2004 09:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:17 PM.