how can I call a check box which is on a frame

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahmed222too
    New Member
    • Sep 2007
    • 47

    how can I call a check box which is on a frame

    how can I call a check box which is on a frame on access visual basic form?
    this code doesnot work:

    if check1.value=tr ue then........

    that code only works when the check box doesnot on a frame
    but when it is on a frame this massage appears:

    you entered an expression that has no value
  • ahmed222too
    New Member
    • Sep 2007
    • 47

    #2
    how can I call a check box which is on a frame

    How can I call a check box which is on a frame on access visual basic form?
    This code does not work:

    If check1.Value = True Then........

    That code only works when the check box is not on a frame.
    But when it is on a frame this message appears:

    You entered an expression that has no value
    Last edited by Killer42; Oct 10 '07, 10:52 PM.

    Comment

    • jrtox
      New Member
      • Sep 2007
      • 89

      #3
      Originally posted by ahmed222too
      how can I call a check box which is on a frame on access visual basic form?
      this code doesnot work:

      if check1.value=tr ue then........

      that code only works when the check box doesnot on a frame
      but when it is on a frame this massage appears:

      you entered an expression that has no value

      Hello,
      Download my attachment and let see if its helping you.

      Extract it on your desktop.


      tell if its not.

      Regards
      Phils. Ervin
      Attached Files

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        You don't! If the checkbox is part of an Option Group, which I assume it is, since you speak of its frame, you refer to the value of the frame.

        When you set up the Option Group, by default it sets a value for each checkbox, normally

        Check1 Value = 1
        Check2 Value = 2
        Check3 Value = 3

        and so forth.
        So instead of the statement

        if check1.value=tr ue then...

        you would use

        If Me.NameOfFrame. Value = 1 Then...

        Welcome to TheScripts!

        Linq ;0)>

        Comment

        • jamesd0142
          Contributor
          • Sep 2007
          • 471

          #5
          If CheckBox1.Check ed = True Then
          '--- do something
          else
          'do something
          end if

          Comment

          • jrtox
            New Member
            • Sep 2007
            • 89

            #6
            Originally posted by jamesd0142
            If CheckBox1.Check ed = True Then
            '--- do something
            else
            'do something
            end if

            Did you daownload the attachment?

            Comment

            • ahmed222too
              New Member
              • Sep 2007
              • 47

              #7
              Originally posted by jrtox
              Hello,
              Download my attachment and let see if its helping you.

              Extract it on your desktop.


              tell if its not.

              Regards
              Phils. Ervin
              Thank you for your interest.
              But I use Visual Basic embedded in Access (access form).
              There is no problem with VB6.
              If you have a solution please help me.
              Again thank you for your interest.
              Last edited by Killer42; Oct 10 '07, 10:53 PM.

              Comment

              • jrtox
                New Member
                • Sep 2007
                • 89

                #8
                Originally posted by ahmed222too
                thank you for your interest
                but i use visual basic impedded in access (access form)
                there is no problem with VB6
                if you have a solution please help me
                again thank you for your interest

                hello, be specific with your problem
                i thought, the problem its in VB6

                regards
                Phil Ervin

                Comment

                • Killer42
                  Recognized Expert Expert
                  • Oct 2006
                  • 8429

                  #9
                  I'm going to move this thread to the Access forum, where you should find a better response.

                  Comment

                  • missinglinq
                    Recognized Expert Specialist
                    • Nov 2006
                    • 3533

                    #10
                    I have merged these two threads for the obvious reason!

                    ahmed222too, in the future, please refrain from posting the same question/problem on more than one TSDN forum!

                    From FAQs


                    Do Not Double Post Your Questions

                    Double posting is where you start a thread on a topic and then for some reason start another thread on exactly the same topic in the same forum. Please do not do this because

                    1. It makes it very hard for people to answer you especially if there are answers happening in all the threads you have started because they have to read 2 or more threads in order to see what has already been said.
                    2. It swamps the forum with your problem resulting in less attention for the other threads.

                    If you feel for some reason that you post has been overlooked (for instance it hasn't had any replies) please do not repost the question. Post a message to the thread you started, this will bump it back to the top of the thread list for the forum.

                    Thank you for your attention in this matter.

                    Linq ;0)>

                    Comment

                    • ahmed222too
                      New Member
                      • Sep 2007
                      • 47

                      #11
                      Originally posted by missinglinq
                      You don't! If the checkbox is part of an Option Group, which I assume it is, since you speak of its frame, you refer to the value of the frame.

                      When you set up the Option Group, by default it sets a value for each checkbox, normally

                      Check1 Value = 1
                      Check2 Value = 2
                      Check3 Value = 3

                      and so forth.
                      So instead of the statement

                      if check1.value=tr ue then...

                      you would use

                      If Me.NameOfFrame. Value = 1 Then...

                      Welcome to TheScripts!

                      Linq ;0)>


                      Thank you very much
                      the problem is solved thanks for your help

                      again thank you very much
                      ahmed

                      Comment

                      • ahmed222too
                        New Member
                        • Sep 2007
                        • 47

                        #12
                        Originally posted by jrtox
                        Did you daownload the attachment?
                        yes, i downloaded it and understood your intention
                        thank you very much
                        ahmed

                        Comment

                        • ahmed222too
                          New Member
                          • Sep 2007
                          • 47

                          #13
                          Originally posted by missinglinq
                          I have merged these two threads for the obvious reason!

                          ahmed222too, in the future, please refrain from posting the same question/problem on more than one TSDN forum!

                          From FAQs


                          Do Not Double Post Your Questions

                          Double posting is where you start a thread on a topic and then for some reason start another thread on exactly the same topic in the same forum. Please do not do this because

                          1. It makes it very hard for people to answer you especially if there are answers happening in all the threads you have started because they have to read 2 or more threads in order to see what has already been said.
                          2. It swamps the forum with your problem resulting in less attention for the other threads.

                          If you feel for some reason that you post has been overlooked (for instance it hasn't had any replies) please do not repost the question. Post a message to the thread you started, this will bump it back to the top of the thread list for the forum.

                          Thank you for your attention in this matter.

                          Linq ;0)>

                          i’m very sorry
                          but really i was confused if the question is related to access forum or visual basic one so i send it to both of them
                          again iam very sorry
                          thank you for your patience with me
                          ahmed

                          Comment

                          • missinglinq
                            Recognized Expert Specialist
                            • Nov 2006
                            • 3533

                            #14
                            I'm glad we could resolve your problem, Ahmed, and that you now understand about not double posting! The question about Visual Basic/Visual Basic for Applications is confusing! Just to clarify things, the code used in Access databases is VBA (Visual Basic for Appplications) and while it is derived from standard Visual Basic (as in VB6) it does vary in sometimes significant ways. Consequently, questions about Access/VBA should always be posted in the Access Forum.

                            Linq ;0)>

                            Comment

                            Working...