Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    4

    Exclamation Unanswered: Report & VBA??->Please Help me

    I've a big problem, i can't understand at all the VBA programming code.

    I want to hide a lable in a report when in a textbox value ies Null or "", but i don't know how to do it... I'm messed!

    if textbox.text="" then

    label.visible=false

    end if

    It's correct???

    Another problem is that I don't undestand the diference abaut use:

    ME!anything!... and ME.ANYTHING....

    yes i want to thing that i'm not very dummy but at this moment...

    Please help me.

  2. #2
    Join Date
    Nov 2002
    Location
    Belgium
    Posts
    243

    Re: Report & VBA??->Please Help me

    Originally posted by spicouc
    I've a big problem, i can't understand at all the VBA programming code.

    I want to hide a lable in a report when in a textbox value ies Null or "", but i don't know how to do it... I'm messed!

    if textbox.text="" then

    label.visible=false

    end if

    It's correct???

    Another problem is that I don't undestand the diference abaut use:

    ME!anything!... and ME.ANYTHING....

    yes i want to thing that i'm not very dummy but at this moment...

    Please help me.

    Code:
    if TRIM(textbox.text) = "" Then
         label.visible = false
    end if
    The TRIM is used to eliminate all the blanks in a string, because sometimes it's possible you think a textbox is empty, but it still contains spaces.

    As far as I know about the ME!anything!... and ME.ANYTHING....
    -stuff is that you usually use a point in VB-code when you refer to a variable.
    On the other hand the exclamationmark (!) is used when referring to an object on a form.


    [code]
    Dim strParameter as String

    Private Sub Form_Load()
    Me.strParameter = "Hello"
    Me ! textbox.caption = Me.strParameter
    end sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •