Alpha Video Training
Results 1 to 6 of 6

Thread: Setting variables ti field values external table

  1. #1
    Carl Scott
    Guest

    Default Setting variables ti field values external table

    I have a problem here, in that I cannot see how to attach my zip file.

    I tick the box but nothing appears to allow an attachment.

    Help.

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Setting variables ti field values external tab

    I opened your attachment just fine.

    Are you saying the action statement 'assign values to variable from external table' is misbehaving when the external table is empty?

    If not, I don't understand the problem you're trying to describe.

    -- t

  3. #3
    Carl Scott
    Guest

    Default RE: Setting variables ti field values external tab

    The external table (Control)is not empty, it has a single record that does have the values in the fields "Day" and "Last_Day" and will deliver the appropriate variable value when called in the OnInit within that table. That is: -

    vd_Date D 22/12/2004
    vd_Last_Day D 21/12/2004

    The call to set variable to field values -external table (Control)in the OnInit of the Main_Menu delivers

    vd_Date D 23/11/2004
    vd_Last_Day D / /

    My understanding is that it should deliver "22/12/2004" and "21/12/2004" and not "23/11/2004" and " / / ".

  4. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Setting variables ti field values external tab

    Why not post a working copy of the database here so we can look over your shoulder?

    In the meantime I'd try to figure out where the wrong values are coming from? Is the wrong record in the external table being read? Does the autoexec script set an initial value?

    In my own work I try not to rely on the OnInit event too heavily. The kind of thing you're doing I'd place in the OnActivate event for the Main Menu or even better in the autoexec script for the database.

    -- t

  5. #5
    Carl Scott
    Guest

    Default RE: Setting variables ti field values external tab

    Thanks Tom.

    I have done as you suggested and put the set variables in the autoexec script.

    It seems that my error was specifing record no. 1 in the Control table (which only has and will always only have a single record) but the record number is actually 3. Must have entered and deleted previous entries.

    Now delivering the correct values.

    Of posting a copy of the database on the message board, I will go a little further before I do that. I know I will have other queries.

    Again thanks

    Carl

  6. #6
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default RE: Setting variables ti field values external tab

    Carl,

    This reminds me of a rule I try hard to remember while developing a database with Alpha Five. More often than not, when my design is misbehaving it's because Alpha Five is doing what I've told it to do, not what I intend for it to do!

    Good luck with your project.

    -- t

Similar Threads

  1. Setting Default Field Values
    By David Montalbano in forum Alpha Five Version 5
    Replies: 2
    Last Post: 06-10-2004, 11:24 AM
  2. setting field values.
    By Alan Lee in forum Alpha Five Version 5
    Replies: 0
    Last Post: 04-08-2004, 11:15 AM
  3. Setting Conditional Field Values
    By djones092 in forum Alpha Five Version 5
    Replies: 1
    Last Post: 03-15-2004, 11:47 AM
  4. XBasic code indirection: setting field values
    By MS in forum Alpha Five Version 5
    Replies: 4
    Last Post: 11-17-2003, 07:39 PM
  5. Set Variable(s) to Field Values (External Table)
    By Alan Storey in forum Alpha Five Version 5
    Replies: 4
    Last Post: 05-31-2003, 02:16 AM

Bookmarks

Posting Permissions

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