Senin, 11 Januari 2016

[MS_AccessPros] Checklist with a twist 1 - different input types

 

This is the first of two checklist questions, which I'll post in separate topics.


With this topic, the checklist responses may can have different types of input: date, Y-N, short text. Also, some of the responses may determine the next steps. I'm looking for feedback on my approach, and/or advice on a better one.


Assume the standard checklist vertical structure: tblChecklistMaster (key ChecklistID), tblChecklistTasks (TaskID), tblChecklistData (ChecklistID, TaskID). When a new project is added to tblChecklistMaster, the tasks are copied from tblChecklistTasks to tblChecklistData.


For different input types, my idea is to add a field to tblChecklistTasks, let's call it InputType, long integer; e.g., 1=date, 2=Y-N, 3=text). On tblChecklistData, make the field Done as short text. On the subform (based on tblChecklistData, main form based on tblChecklistMaster), have code that will do different things, when the Done text box is clicked, depending on InputType:

  1. Enter today's date
  2. Toggle between Y-N
  3. Allow the input of text.

For next steps, my idea is to add another table, tblChecklistTaskOptions, with 3 fields: TaskID (link to tblChecklistTasks), OptionA, OptionB. TaskID would be the originating ID of the Task that determines the next set of tasks. OptionA would be the TaskIDs if Y is chosen, OptionB if N is chosen. There can be multiple entries of next steps for each originating TaskID. Initially, I wouldn't populate tblChecklistData with any task that is in OptionAorB. When a choice is made on the originating task, I would then populate tblChecklistData with the next step tasks from OptionAorB. If the choice were changed, I could delete one set of next steps and replace it with another. tblChecklistTasks has the field SortOrder, so the next step tasks would go in the right place when the form is refreshed.


I know how to do the coding of this. I'm looking to see if my approach/idea is off base.


Thanks

Adam

__._,_.___

Posted by: runuphillracing@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Tidak ada komentar:

Poskan Komentar