Hi all good day, I wanted to enter month as tee field of a table once the user selects the first month as he wish. E.g. If user enters March, I want to enter rest of the months as field names of a table including the month that the user entered.
Thanks
CLOSE DATABASES ALL
CREATE CURSOR crsTest (Id i)
lnMonth = 3 &&& The User select March
lcText = [ALTER Table crsTest ADD Column ]
FOR lnCount = lnMonth TO lnMonth+11
lcCommand = m.lcText + CMONTH(DATE(2009, IIF(lnCount <= 12, m.lnCount, m.lnCount - 12),1))+ [ Char(10)]
EXECSCRIPT(m.lcCommand)
NEXT
BROWSE NORMAL
or
CLOSE DATABASES ALL
CREATE CURSOR crsTest (Id i)
lnMonth = 3 &&& The User select March
lcText = [ALTER Table crsTest ADD Column ]
FOR lnCount = lnMonth TO 12
lcCommand = m.lcText + CMONTH(DATE(2009, m.lnCount, 1))+ [ Char(10)]
EXECSCRIPT(m.lcCommand)
NEXT
BROWSE NORMAL