Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Xbasic - Switch to Design View

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    RE: Xbasic - Switch to Design View

    Daniel,

    Tried you suggestion and it worked, the first time. However, on further attempts, the form goes to new record entry mode. I'm experimenting with the names, parent.form vs browse2, etc.

    Any further suggestions you have are more than welcome.

    Thanks,

    kenn
    TYVM :) kenn

    Knowing what you can achieve will not become reality until you imagine and explore.

    Comment


      #17
      RE: Xbasic - Switch to Design View

      Perhaps some progress:

      When I use this script on the button, it filters the records but puts the browse into New Record mode. It correctly gives the total but then as soon as it goes to new record mode the total = $0.

      BROWSE2.activate()
      Browse2.quick_search()
      Parentform.fetch_next()
      Parentform.fetch_prev()

      (I tried replacing Parentform with Browse2 but that didn't work)

      Then, if I use this script, it filters OK but no total update. Rather than go to design mode, I only have to exit the browse and switch parent records and then back again and the total is updated. Getting xpasic to do this should be feasible but the above is quicker and cleaner if the new record mode could be disabled.

      BROWSE2.activate()
      Browse2.quick_search()

      Thanks,

      kenn
      TYVM :) kenn

      Knowing what you can achieve will not become reality until you imagine and explore.

      Comment


        #18
        RE: Xbasic - Switch to Design View

        HIP, HIP HORAY!!!!!!!!!!!!!!!!!!!!(:-)

        Got it!! Works great! This is what I did (script on the button). I used Action Scripting.

        Inline Xbasic
        BROWSE2.activate()
        Browse2.quick_search()
        Activate BROWSE1
        Fetch Next
        Fetch Previous
        Activate BROWSE2

        The records are correctly filtered and the amount is correctly shown, even when I continue to filter the already filtered records. Now, I'm going to write that in Xbasic to learn a bit more.

        Inline Xbasic
        BROWSE2.activate()
        Browse2.quick_search()
        Activate BROWSE1
        Fetch Next
        Fetch Previous
        Activate BROWSE2

        The records are correctly filtered and the amount is correctly shown, even when I continue to filter the already filtered records. Now, I'm going to write that in Xbasic.

        Everyone's suggestions contributed to this. Daniel Weiss' suggestion got me over the hump, just had to moidify it. It was a tough, time consuming climb (days) but, is the view ever great from the top! Reminds me of a song with part of the lyrics, "You wouldn't know the good times if it weren't for the bad times". How true that is in database design as well.

        Oh, Stephen, I almost forgot, what was the word you used, Persist!!?

        Thanks again to everyone!!

        kenn (:-)

        TYVM :) kenn

        Knowing what you can achieve will not become reality until you imagine and explore.

        Comment


          #19
          RE: Xbasic - Switch to Design View

          Ken,
          This is a little long, put here is the process. The xbasic was cut and paste from working scripts.

          In my app the main form is a tabbed form called GroupService. DialogReload is identical except there are no fields on the form, just a message "Please Wait � Processing". In my case, I use a button to add the records to the browse with xbasic and at the end of the button I have xbasic shown below. There are three global variables. I save the original tab so that the original form can reopen with the same tab active.

          Variables defined in an autoexec script:

          Dim global recno as n
          Dim global tab as n
          Dim global reload as l
          **********************************************
          On form Groupservice OnExit event: (this saves the record number and tab of the current record)

          tbl = table.current(1)
          tab = parentform:tabbed1.tab_get()
          recno = tbl.recno()
          -----------------------------------------------------------------
          On button that closes form Groupservice to "fix" index (this also the tab of the current record, opens the dialog, ands sets the logical variable to T)

          tbl = table.current()
          tab = parentform:tabbed1.tab_get()
          if is_object("DialogReload") then
          else
          :Form.view("DialogReload")
          end if
          :Groupservice.Close()
          end
          -----------------------------------------------------------------
          On form Groupservice OnInit event: ( when the forms reloads, if reload = .T., then find the last record opened and set the tab to the original)

          if reload = .T.
          reload = .F.
          Parentform:Tabbed1.Tab_set(tab)
          tbl = table.current()
          tbl.fetch_goto(recno)
          Parentform.resynch()
          end if
          reload = .F.
          -------------------------------------------------------------------
          On form Groupservice OnActivate event: (close the dialog here)

          if is_object("DialogReload")
          DialogReload.close()
          end if
          ****************************************************
          On form DialogReload OnInit event (not needed, but looks good)

          :DialogReload:Tabbed1.Tab_set(tab)
          :DialogReload.Resynch()
          -------------------------------------------------------------------------------
          On form DialogReload OnTimer event (timer is set to .5 sec)

          reload = .T.
          if is_object("GroupService") then
          GroupService.show()
          GroupService.activate()
          else
          :Form.view("GroupService")
          end if
          end
          ***************

          Hope this gives you some idea of a method to close and reopen a form to the same record. I am doing more than that, but in my case it was necessary.

          Jerry

          Comment


            #20
            RE: Xbasic - Switch to Design View

            Hi Jerry,

            Thank you for your time and suggestion. I discovered that the form didn't really need to go to design view and back but could go to the parent browse, do a flip flop on the records there and then back to the original browse. Apparently, a child or grandchild browse has to simply loose focus and gain it again. Strange, but it works.

            My method is posted at the end of this thread. Perhaps it may give you some insight to a shorter way in your situation.

            Thanks again,

            kenn
            TYVM :) kenn

            Knowing what you can achieve will not become reality until you imagine and explore.

            Comment

            Working...
            X