Multiple criteria to drill down to reporting record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings,
pardon if this is a simpleton question....

I have a personnel form that has a training detail subform that I need to
generate an authorization letter off of. The fields I need to use as criteria
are a Tech number and a validation date. I searched the help files and found
the BuildCriteria function which seems to be what I need. However, when I
tried to program it, Access choked on the 'dbText' setting of the variable.
The error states I haven't defined what dbText is.

Is there an easier way?
 
dbText comes from the DAO library

If you are using Access 2000 or 2002, you may need to add a reference to
this libary. From a code window, choose References on the Tools menu, and
check the box beside:
Microsoft DAO 3.6 Library

More info on references:
http://allenbrowne.com/ser-38.html
 
Thanks Allen. I'm using Access 2003 but did the step you suggested.

If I use the RecordID from the subform to grab the single record I need,
will it also pick up the related record from the main form? I am using a
query to grab the data from both related tables to make my report. The button
for the report is on the subform.
 
The RecordID from the subform is primary key in its table?

If so, that limits the report to just one record from the subform's table,
and it can include data from the matching record in the main form's table,
so Yes, I think that's what you asked.
 
Back
Top