Alpha Video Training
Results 1 to 5 of 5

Thread: Wrong data type

  1. #1
    Al Lenkner

    Default Wrong data type

    When I run this script, I get an error code on the last line, telling me that this is the wrong data type. The value for days comes from a multi-state button, multiplied by 4 and added to the start_date. The resulting date to be stored in the object "this.daypkd21". No matter what I've tried, this.daypkd21 won't accept the value for first_day.
    If you think that you need the complete app to test, let me know but I don't think that it is necessary because the only value that is missing is period_number and that can be placed at the beginning.

    dim start_date as d
    dim first_day as d
    dim days as n
    dim day1 as n

    Start_date= {01/03/200}

    'Figure first date of the period selected
    days = val(period_number) * 4
    day1 = round(days,0)

    First_day = Start_date + day1

    this.daypkd21.value = first_day

  2. #2
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    S.E. Michigan

    Default RE: Wrong data type

    Assuming your daypkd21 object is linked to a date field, try this syntax using a colon between the object this and the object daypkd21:


    Also note that this script will only work if run from the form. It will not run correctly in the code editor.

    Cal Locklin

  3. #3
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000

    Default RE: Wrong data type


    For help with the syntax when addressing forms and objects on forms, search the help files for:

    Referring to Form and Browse Objects

    -- tom

  4. #4
    Al Lenkner

    Default RE: Wrong data type


    Thanks for responding.

    daypkd21 is a form field. Once this gets straightened out, then it will be changed to a table field which has been set up, through field rules, to propagate the next 3 days automatically.

  5. #5
    Al Lenkner

    Default RE: Wrong data type


    Will do. Thanks.

Similar Threads

  1. data type
    By Richard Froncek in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-27-2004, 08:30 PM
  2. Type of 'servers' to use for data ?
    By Robert Lee in forum Alpha Five Version 5
    Replies: 2
    Last Post: 02-03-2004, 04:28 AM
  3. Wrong Argument Type Error
    By Denny Johnson in forum Alpha Five Version 5
    Replies: 5
    Last Post: 01-11-2004, 09:20 AM
  4. Arguement data type
    By L W Smith in forum Alpha Five Version 5
    Replies: 2
    Last Post: 11-12-2003, 04:53 AM
  5. Convert Data Type
    By Michael Lanzieri in forum Alpha Five Version 4
    Replies: 8
    Last Post: 06-06-2000, 07:37 PM


Posting Permissions

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