Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Access Page - Finding a record?

Status
Not open for further replies.

FancyPrairie

Programmer
Oct 16, 2001
2,917
US
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:

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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top