display last entry

D

Dylan

Hi,

I have a small simple database that keeps track of leads that are allocated
to three staff. The db contains two tables:
Table 1 - "tbl_lead":
leadID
accountNo
companyName
date
repID

Table 2 - "tbl_rep":
repID (linked to repID in tbl_lead)
repName

I have a form that the user enters account name, company name, date and
selects rep name via a combo box. As a process we need to allocate the leads
to three reps sequentially (to make sure the workload is even). The user
will be frequently interrupted and may not remember which rep was allocated
the last lead. I would like a field in the form that displays who received
the last lead and what the company name was (without activating a command
button or the like).

Any ideas?
Dylan
 
J

John Vinson

I would like a field in the form that displays who received
the last lead and what the company name was (without activating a command
button or the like).

You can use a query based on the Lead and Rep tables, joined; sort by
Date and set its Top Values property to 1 to display only the rep for
the most recent date. You can either use DLookUp to look up the only
record in this field, or use a small subform based on the query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top