I have a table that lists the forms people need to have. Since there will ultimately be a lot of people using this system, I want to add new forms that are required programmatically.
Currently my table (table A)
has fields: (I'm starting with these and will add more fields later)
id = number
formname = text
addit = yes/no
deleteit = yes/no
Each person (workgroupid) can have multiple forms but not everyone has the same forms.
what I need to do is get the distinct workgroup ids and then loop through to add the new form. I am defaulting the addit, deleteit to no's to start with.
I tried
do while not eof()
select distinct workgroupid from table a
insert into table a (workgroupid, addit, deleteit) values ([workgroupid], false, false)
loop
I know the syntax isn't correct and in fact the first thing it doesn't like is the insert statement.
Can anyone give me some guidance?
Thanks
lhuffst
Currently my table (table A)
has fields: (I'm starting with these and will add more fields later)
id = number
formname = text
addit = yes/no
deleteit = yes/no
Each person (workgroupid) can have multiple forms but not everyone has the same forms.
what I need to do is get the distinct workgroup ids and then loop through to add the new form. I am defaulting the addit, deleteit to no's to start with.
I tried
do while not eof()
select distinct workgroupid from table a
insert into table a (workgroupid, addit, deleteit) values ([workgroupid], false, false)
loop
I know the syntax isn't correct and in fact the first thing it doesn't like is the insert statement.
Can anyone give me some guidance?
Thanks
lhuffst