Using squences with a for lop

new topic     » topic index » view thread      » older message » newer message

I have made a simple program which stores a couple of fields

- snip
constant
Lbl1 = create(LText,"Code",Win,20,50,60,20,0),
Code = create(EditText,"",Win,100,50,42,20,ES_UPPERCASE),

Lbl2 = create(LText,"Description",Win,20,80,60,20,0),
Desc = create(EditText,"",Win,100,80,278,20,ES_UPPERCASE),
    
--snip

         err = db_select_table("Diagnosis")
	 err = db_insert(getText(Code),Diag_Data)
--snip

Which is working okay with a couple of fields, but what if I want to 
store 10, or 100?

I know the answer is to use sequences and a for loop.  I can get data 
out of a sequence using [], but how do you get it in?

I tried this and that didn't work

sequence

Lbl1 = create(LText,"Code",Win,20,50,60,20,0),
data[1] = create(EditText,"",Win,100,50,42,20,ES_UPPERCASE),

Lbl2 = create(LText,"Description",Win,20,80,60,20,0),
data[2] = create(EditText,"",Win,100,80,278,20,ES_UPPERCASE)

I've read the manual and looked at programs, but I can't figure this 
out.  I need to get this program running and  I'm stuck.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu