Disclaimer: I have not worked with A5 code for probably 5 years maybe longer. I was completely inexperienced when I started but managed to created some useful scripts, although flawed initially but straightened out by the forums, but honestly never had to go very deep into code to get my database to function properly. (Why we picked A5 to begin with :)
With that being said, here is what I am looking to do. I would like to create a script that asks the user for a starting number and an ending number. I would like it to populate a table with the starting number, then each field after that is populated with that number added to a multiple of 25 until the ending number is reached. My table is set up with 2 fields, 1 that the script is to fill based on the users information and another that is an auto calculated field of the first number + 24. The table will ultimately look like this
User Calc
101 125
126 150
151 175 etc.
The best I can put together right now is....
dim x as n
dim y as n
dim z as n
dim s as ask_user_variable (not sure if this is valid...starting number)
dim e as ask_user_variable (ending number)
dim t as p (want this to locate the table)
(This is the part I am lost on how to format the code)
open table
(e-s)/25=x (this will define how many steps I have in this process)
y=0 to x (need y to start at 0 then step through by 1 until x is reached)
S+(25y)=z
Put z in "User" field of table
If y is not equal to x, then y+1
If y is equal to x, then close table
end
Any help in logic, mechanics of writing the code, or even suggested reference is greatly appreciated.
With that being said, here is what I am looking to do. I would like to create a script that asks the user for a starting number and an ending number. I would like it to populate a table with the starting number, then each field after that is populated with that number added to a multiple of 25 until the ending number is reached. My table is set up with 2 fields, 1 that the script is to fill based on the users information and another that is an auto calculated field of the first number + 24. The table will ultimately look like this
User Calc
101 125
126 150
151 175 etc.
The best I can put together right now is....
dim x as n
dim y as n
dim z as n
dim s as ask_user_variable (not sure if this is valid...starting number)
dim e as ask_user_variable (ending number)
dim t as p (want this to locate the table)
(This is the part I am lost on how to format the code)
open table
(e-s)/25=x (this will define how many steps I have in this process)
y=0 to x (need y to start at 0 then step through by 1 until x is reached)
S+(25y)=z
Put z in "User" field of table
If y is not equal to x, then y+1
If y is equal to x, then close table
end
Any help in logic, mechanics of writing the code, or even suggested reference is greatly appreciated.
Comment