View Full Version : Field Selection


kermit5
04-19-2002, 01:23 PM
Hello.

I am having quite a time with a form I am trying to create. Here is the jist:

The goal of my form is to create a dynamic form whereby the user can select a series of fields from a list of available fields, specify the order in which they appear on the form and input default values for the selected fields.

My current form layout is as follows:

A combo box, cmbProjectName, whereby the user selects a specific project for which they want the form created.

A list box, lstFieldOptions populated by Field Lists from a query "Takeoff Option Query" wherein I have selected the fields I want available to the user. The query source is a table "Opening Takeoff".

A list box, lstFieldsSelected populated by the fields selected by the user in the order selected.

A command button, cmdSelect, which should add the current recordset from lstFieldOptions to lstFieldsSelected.

A command button, cmdDeselect, which should remove the current recordset from lstFieldsSelected.

I am having the following problems (in addition to general lack of knowledge):

I am not sure how to set up the lstFieldsSelected to show the records as the user selects them. My idea was to create a table, "Takeoff Fields Selected", that has a referentially enforced relationship to the "Project File" table via "Master Project ID" established by the users selection of the project name in my form. When the user moves the focus to a field in lstFieldOptions and clicks the cmdSelect, the value would be added to the table along with the Master Project ID number from cmbProjectName. To establish the order of selection, I could use the time that the field was selected as its indexed value, but I would like the option to change the priorities of the selected fields without being required to delete the items from lstFieldsSelected.

I assume that I need the lstFieldsSelected to be populated by a query to enable me to filter the field values in tbl.Takeoff Fields Selected for only the project I have currently selected.

In addition to this, I need to be able to use the same form format each time I enter information for that specific project without being required to re-select fields every time (so if the fields have already been selected for a project, bypass the opening selection process and go straight to the dynamic form). I do need, however, to be able to re-specify the form format if the user requires changes.

Any ideas?

[This message has been edited by kermit5 (edited 04-19-2002).]

[This message has been edited by kermit5 (edited 04-19-2002).]

[This message has been edited by kermit5 (edited 04-19-2002).]