Link to home
Start Free TrialLog in
Avatar of ayurkowski
ayurkowski

asked on

How to build a "references dialog box"-type checklist?

Must be tired, but I have scratched my head for a few hours and can't come up with a method to accomplish this:
I want to create a continuous subform which lists AVAILABLE diagnostic tests (based on a product type selected in the parent form) and allows the user to check which ones are to be performed. On re-opening the list, both the selected and available items should appear. EXACTLY the same function as the VBA "references" checklist, right? Populating the list from a product-to-tests xref table is no biggie, and I'm thinking the checkbox should be unbound and linked at runtime. The checkbox update event should then probably add (or remove) records from a "selected tests" table.
To simplify things, let's say:
T1: test_key, test_desc
T2: product, test_type_reqd
and if T1 = (1,kick it),(2,squeeze it),(3,smell it)
and T2 = (A,2),(A,3)...

I want to see
Unit: "A"
->    kick it          _
       squeeze it    X
       smell it        X

How they heck do I setup the subform and click events?
Like I said, too many hours this week in front of the screen...
ASKER CERTIFIED SOLUTION
Avatar of dannywareham
dannywareham
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I was thinking more about this and decided it needs a small change in the Do loop:

Do while Not RS1.EOF
    If RS1!BoundCheckBoxField = True then
       RS2.AddNew
          RS2!TestKey = RS1!TestKey
          RS2!TestDesc = RS1!TestDesc
          RS2!.DateSelected = Date
       RS2.Update
   
       RS1.Edit
          RS1!BoundCheckBoxField = False   'Clear the checkbox field
       RS1.Update
    end if

    RS1.Movenext      'Move to the next record to check if the checkbox is true  
Loop

That way the BoundCheckBoxField is cleared to False only if it was true to start with.