FancyPrairie
Programmer
I have a dap containing 3 sections. The top most section (DataPages(0)), is based on a query represented in tablular form (i.e. List if Facilities). The next section is also based on a query in tablular form (i.e. List of depts). The 3rd section is also based on a query in tabular form (i.e. list of Employees).
So, each Facility may contain several departments. And each department may contain many people.
Looks something like this:
+Facility1
+Facility2
+Facility3
+Department1
+Department2
Employee1
Employee2
+Facility4
Now, how would I find the record for Employee2?
I know the Facility and Department in which Employee2 resides. It appears that I first have to search for the Facility and once found, expand it. Then search in the next section for the department and then expand it. Then search the 3rd section for Employee2.
However, it appears that because of the delay in expanding the Facility section (to expose the departments), the search code for the department fails (since its Facility section is not yet expanded).
Is there an easier way to do it?
Code (from memory) looks something like this:
So, each Facility may contain several departments. And each department may contain many people.
Looks something like this:
+Facility1
+Facility2
+Facility3
+Department1
+Department2
Employee1
Employee2
+Facility4
Now, how would I find the record for Employee2?
I know the Facility and Department in which Employee2 resides. It appears that I first have to search for the Facility and once found, expand it. Then search in the next section for the department and then expand it. Then search the 3rd section for Employee2.
However, it appears that because of the delay in expanding the Facility section (to expose the departments), the search code for the department fails (since its Facility section is not yet expanded).
Is there an easier way to do it?
Code (from memory) looks something like this:
Code:
Step 1
...code to find the correct facility section...
...sec.makecurrent(true)...
...sec.expand
Step2
...code to find the correct department section...
...sec.makecurrent(true)...
...sec.expand
Step3
...code to find the correct employee...
Note that I use the DefaultRecordset to find the correct record in each section.