Searching a field on a subform?

  • Thread starter Thread starter Grace
  • Start date Start date
G

Grace

I have a form that contains a subform. The main form
lists the name of the employee with PIN set as the master
field. The subform contains the tickets associated with
the employee. [TicketNumber] is the child field.

How can I search for a TicketNumber on the main form so
that it brings up the employee's name and the ticket
associated with the entered [ticketnumber]? I would like
as little key strokes as possible so I don't want to have
to first search for the PIN.

Thanks for your help and Happy Holidays.

Grace
 
Hi Grace,
I think I follow what you want...There are multiple ways to do this, but
I'll write what seems easiest to me.

You have one table with employee names and PINs. The main form links to this
table.
You then have another table with each individual ticket number (and other
details), which is linked to the child form.

I would say that you should have an [EmployeePIN] field in the TicketNumber
table, so that each ticket number has an employee PIN associated with it.

Then, I would probably reverse the forms. Make the main form link to the
TicketNumber table, and a small subform linked to the Employee table.
(It's easier to filter on the main form than on the subform)
Link the forms using the [EmployeePIN] field on the parent and child forms.
Now when you enter a ticket number, the main form will move to that record,
and the subform will automatically show the name of the employee associated
with that EmployeePIN.

I hope that helps. If you aren't sure what I mean, please feel free to email
me directly. (e-mail address removed)
 
Back
Top