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

thinking outloud ... need opinions/suggestions

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

    thinking outloud ... need opinions/suggestions

    When I am entering a new invoice, I have to fields that use table lookups. The cust_id field looks up the matching record in the t_cust table and then auto fills the corresponding customer information fields in the invoice. If this is a new customer, I have a button to 'enter a new customer' on the invoice form (this was done at the client's request as they do not like the enter new record option in the lookup). Once the new customer has been added the client clicks the return to invoice button which saves their new customer record and brings them back to where they left off on the new invoice.

    The auto_id field on the new invoice form looks up the matching record in the t_auto table and returns only records that match the cust_id in the current invoice. The client selects the appropriate auto they need and corresponding auto information fields are auto filled.

    When I am entering a new invoice I want to add a new customer. I need to be able to add a new auto for that customer at the same time and I would like the cust_id to be automatically inserted. Instead of the 'return to invoice' button on my form, I can make this an 'add auto info' button and move the 'return to invoice' button to that form upon completion.

    Here is my problem. What code would I need in my 'add auto info' button that would automatically fill the cust_id field on the add auto info form based on the current customer record that will be saved when the button is pushed?
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

    #2
    RE: thinking outloud ... need opinions/suggestions

    Hi Cheryl,

    Read your post and was puzzled again. But I just gues: you're not native English and most times you used the word "auto" you ment "car"?
    I'm Dutch and I also refer to my "car" as my "auto".

    In this assumption:
    Have you tried using some global variables? You reset them to some null value when entering the new customer/new car form, saving the record sets them and closes the form because another global variable was set by opening the invoice form. Returning to the invoice form, you could test these? Of course you should not allow for more instances of the new customer/new car form.

    Jos

    Comment


      #3
      RE: thinking outloud ... need opinions/suggestions

      Hi Jos,

      Sorry my posts always confuse you, I am sure you are not alone as they confuse me most of the time as well **winks**

      I too was thinking along the lines of a global variable, but how to actually implement it had me at a loss. This is what I have accomplished so far:

      f_inv_dat - enter new invoice form
      f_cust_inv - enter new customer form (opened directly from the f_inv_dat)
      f_auto_inv - enter new automobile form (opened directly from the f_cust_inv)

      I should not have any trouble with values of the global variables as the above sequence is the only place I will be using these variables and the only way my client will be accessing the various forms.

      On the f_inv_dat I have a button to 'enter new customer'. The OnPush event of this button saves the current invoice and opens the f_cust_inv form, it does NOT close the f_inv_dat form as this is my way of returning back to the current invoice being entered.

      On the f_cust_inv I have a button to 'enter new automobile'. The OnPush event of this button saves the current customer, DIMs my global variable for cust_id and assigns the value of the cust_id field to the variable, opens the f_auto_inv form, then closes the f_cust_inv form as it is no longer needed.

      On the f_auto_inv, the OnInit event of the form I take the value of my global variable and assign it to the cust_id field on this form which will save in the t_auto table.

      This all works beautifully and as I need it to.

      The f_auto_inv form will have the 'return to invoice' button with an OnPush event to DIM a global variable for the auto_id and assign the value of the auto_id field from that form to the variable.

      NOW, since the above worked so well, I would like to take this a step further and have the cust_id and auto_id fields on my f_inv_dat to automatically fill from the global variable values. The problem is, since the f_inv_dat form is already opened (unlike my f_auto_inv form) I am unable to use the OnInit event of the f_inv_dat form to assign the values to the two different variables.

      Since I am unable to use the OnInit event of the f_inv_dat form to assign the values ... is there a way that perhaps I can do this on my 'return to invoice' buttom from my f_auto_inv form?

      This is the code that I currently have:

      OnPush event of button to add new automobile

      'Save record in current form.
      topparent.commit()

      'enter new automobile for current customer and assign value to variable
      DIM Global var_Cust_Id as C
      var_Cust_Id = t_cust-"cust_id
      query.filter = ""
      query.order = ""

      OnInit event of f_auto_inv

      'Automatically fill the cust_id field with the value of the global variable
      t_auto-"cust_id = var_Cust_Id


      Cheryl
      #1 Designs By Pagecrazy
      http://pagecrazy.com/

      Comment


        #4
        RE: thinking outloud ... need opinions/suggestions

        OK, here is a thought: if I close the current invoice in the OnPush event of 'enter new customer' instead of leaving it open, I can retrieve the current record number as well by adding the following code to the event:

        'enter new customer for current invoice
        record_number = current_record_number()
        query.filter = "recno() = " + record_number
        query.order = ""

        If I do the above, that would allow me to assign the values of my global variables to the cust_id and auto_id fields in the OnInit event of the f_inv_dat form.

        However, how would I then return to that same record_number? What code would I need to add to the 'return to invoice' button OnPush event that will retrieve that record?

        AND ... what code would I use to place my cursor in the cust_id field of the f_inv_dat form so that I will be returning to where I left off?
        Cheryl
        #1 Designs By Pagecrazy
        http://pagecrazy.com/

        Comment


          #5
          RE: thinking outloud ... need opinions/suggestions

          Correction on this code:

          'enter new customer for current invoice
          record_number = current_record_number()
          query.filter = "recno() = " + record_number
          query.order = ""

          Change the above to:

          'enter new customer for current invoice
          DIM global var_Record_Number as P
          var_Record_Number = current_record_number()

          On my 'return to invoice' button I will add:

          query.filter = "recno() = " + var_Record_Number
          query.order = ""

          I will let you know if this works :)
          Cheryl
          #1 Designs By Pagecrazy
          http://pagecrazy.com/

          Comment


            #6
            RE: thinking outloud ... need opinions/suggestions

            My syntax was incorrect ... but more thought into this and closing the invoice data entry form will not work anyway. I still cannot use the OnInit event of the form as that form will be used for entering new invoices without always adding new customers.

            So ... I still need a way to taking the values of my global variables for the cust_id and auto_id to automatically fill in when I return to the invoice to continue the data entry.
            Cheryl
            #1 Designs By Pagecrazy
            http://pagecrazy.com/

            Comment


              #7
              Problem resolved

              I resolved my issue by using the OnActivate event of the f_inv_dat to automatically fill the cust_id and auto_id fields of the current invoice. I also activated focus on the cust_id field by activating the object.
              Cheryl
              #1 Designs By Pagecrazy
              http://pagecrazy.com/

              Comment


                #8
                RE: Problem resolved

                Hi Cheryl,

                Reading your potst I also opted for the OnActivate event.
                You could also consider to use REDIM instead of DIM so you won't get an error when it is done a second time.

                Jos

                Comment

                Working...
                X