I'm having a db programming drama. We have a series of questionnaires;
each questionnaire is comprised of a series of forms that a user must
fill out. A document is produced at the end of the questionnaire. Some
of the fields are required and some are not, depending on how the
fields are filled out can make the document look very different.

My aim is to produce something that lists all the possibilities that
the question can be filled out in. The list of the form fields are in
a SQL Server 200 database table "tblDocPageFields", the structure of
the table is similar to this:

tblDocPageFields
- ID
- Page ID
- Field Name
- Field Order

Another table specifies whether the field is required or not which
contains the fieldID and a validation Message to be displayed if the
field is not filled in.

tblDocPageFieldsReq
- ID
- FieldID
- ValidationText

For example if I have a document with 2 fields and the first one of
them are required the possibilities are:

Field1 Field2

Filled Nothing
Filled Filled

NothingFilled

I need to be able to list this somehow, as some of the surveys have a
huge amount of questions that need to be checked for all
possibilities. Does any one have any idea How I can accomplish this
through a stored procedure or ASP logic or something… Please help!!!

ryan@lawcentral.com.au