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

Argument Is Incorrect Data Type

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

    Argument Is Incorrect Data Type

    Hi:

    Here we go again with one those annoying problems that drive me up a wall. I borrowed Barry Rochford's technique of using a Dialog Form to obtain Global Variables used in a report. I've used them for several months with no problems at all.

    However, I just moved [copied] two different forms [both used as Dialog Forms] to a new database.

    When I edit the OnActivate Event in BOTH forms and then save the form, I get the following messages.

    -------------------------------------------------
    Dialog Form Using Date Variables:

    Script OnActivate line:9
    :dfrmDates:VStart_Date.Refresh()
    Argument Is Incorrect Data Type

    -------------------------------------

    Dialog Form using Character Variables:

    Script OnActivate line:8
    :dfrmMonthYr:VarMonth.Refresh()
    Argument Is Incorrect Data Type
    -------------------------------------------------

    I am going to post both OnActivate scripts [for each form], one uses DATE variables while the other one uses Character variables. Even though I get the same message shown above after editing both scripts in the OnActivate event, the scripts seem to work properly. That is driving me crazy.

    Here is the script for the form using dates:
    --------------------------------------------
    Dim Global VStart_Date as D
    Dim Global VEnd_Date as D

    'Clear the Global Variables and refresh the screen during the form dfrmDates OnActivate Event. Note, those are French Brackets.

    VStart_Date = {}
    VEnd_Date = {}

    :Dfrmdates:VStart_Date.Refresh()
    :Dfrmdates:VEnd_Date.Refresh()

    END

    Here is the script for the form using character variables.
    --------------------------------------------------------

    'Clear the Month and Year Global Variables and Refresh the screen during the form dFrmMonthYR OnActivate Event:

    Dim Global VarMonth as C
    Dim Global VarYr as C

    VarMonth = " "
    VarYr = " "

    :dfrmMonthYr:VarMonth.Refresh()
    :dfrmMonthYr:VarYr.Refresh()

    END
    ------------------------
    Robert

    #2
    RE: Argument Is Incorrect Data Type

    Robert,

    Argument Is Incorrect Data Type

    is sometimes returned when Alpha can't understand what you intend. I got this error today when I tried to run a script with this line in it....

    :Summary.run_silent("summary to hist001")


    Don't see the problem ? took me several tries. The correct coding is.....

    :Summarize.run_silent("summary to hist001")

    So you may have some other problem with your script than where you are looking.

    However, I just moved [copied] two different forms [both used as Dialog Forms] to a new database.

    Is everything in place in the new database for the copied forms to reference?


    Just a guess.

    Stan
    There can be only one.

    Comment


      #3
      RE: Argument Is Incorrect Data Type

      Stan wrote:

      [Is everything in place in the new database for the copied forms to reference? ]

      I would think so, I checked everything I could think of at least three times before posting my message. Since then I've made some progress, but I still haven't worked with all of the changes to figure out what or why it is happening.

      I finally got the dates form to refresh the global variables, but that happened ONLY after I moved away from calling the form via the OnPrinInit event. Now I call the form from a simple button and I CANNO use it as a DIALOG form. When called in normal mode, I still have the same problem with refresh(), however, at least I can use parentform.resynch()for the Date Variable form.

      I guess we could call that progress because parentform.resynch() wasn't working when the form was called as a Dialog from OnPrinInit.

      There is good news, the character variables are being refreshed properly, but only when I call the form in normal fashion versus calling it as a Dialog Form.

      I don't really understand why calling the form in Dialog mode would not allow refreshing of the variables during the OnActivate event, that is obviously very puzzling to me.

      Anyway, I still have a lot of work ahead of me trying to figure out why I cannot use the forms in Dialog mode and why only the character variable form is refreshing properly.

      Comment


        #4
        RE: Argument Is Incorrect Data Type

        just a thought
        I had much trouble with variables and dialogs where the variables were not global - so when I made all variables global that I set and use between the regular and dialog forms everything worked okay
        Cole Custom Programming - Terrell, Texas
        972 524 8714
        [email protected]

        ____________________
        "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

        Comment


          #5
          RE: Argument Is Incorrect Data Type

          oopsy - sorry - now i see that you WERE using global variables.
          Cole Custom Programming - Terrell, Texas
          972 524 8714
          [email protected]

          ____________________
          "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

          Comment


            #6
            RE: Argument Is Incorrect Data Type

            Robert,

            Your error message makes me think maybe Alpha Five is getting your variables mixed up with the names of the controls on your form which display the variables.

            .refresh() cannot be used to refresh the variables themselves

            It is used to refresh the control which displays the variables.

            I'd check the properties of the controls and verify that the name of each is as expected. If they were given different names when you 'copied' the form, this might account for the errors you're getting.

            -- tom

            Comment


              #7
              RE: Argument Is Incorrect Data Type

              I've checked the form name numerous times, it is in fact dfrmDates.

              But there is something very strange about this form, and it may be the root cause of my problem. Hopefully I can explain what is happening, and let me tell everyone who is reading this thread, this is very bizarre!

              There are only two fields on the form, they are both Global Variables. I named those two fields are:

              VStart_Date and VEnd_Date.

              As for the correct nomenclature, I am always confused when it comes to that aspect of A5, but here is what I initially wrote in my OnActivate Event script

              :Dfrmdates:VStart_Date.Refresh()
              :Dfrmdates:VEnd_Date.Refresh()

              The above did not work, I constnatly received an error message.

              There is one aspect of this form that I find very confusing. Although I prefixed both field names beign with a letter V [obviously for variables], when I'm editing the OnActivate script, and select the drop down arrow in the Container, I can see all of the fields and buttons on the form. Check this out, the only fields that show up are:

              Start_Date and End_Date,

              I cannot find a field named VStart_Date or VEnd_Date!!!Tthis is the bizarre part. When I first created the form a long time ago, the field names were Start_Date and End_Date, and then I subsequently decided to place a V in front of each name.

              But once again, when I check all of the available fields in the OnActivate Event, there are no V's in the name, I think that is very weird.

              Anway, I just found this out and tried using the same nomenclature as above, without the letter V at the beginning of each variable. And so far, the refresh() lines in the script appear to be working. Here is the latest version of my OnActivate event script:
              --------------------------------------------------------

              Dim Global VStart_Date as D
              Dim Global VEnd_Date as D

              Debug(0)

              VStart_Date = {}
              VEnd_Date = {}

              'parentform.resynch() 'don't need this line if the following two lines work.

              :Dfrmdates:Start_Date.Refresh() 'No V in the variable name
              :Dfrmdates:End_Date.Refresh() 'No V in the variable name

              END

              Thanks,

              Robert

              Comment

              Working...
              X