C
chris
I have a form [frmProject] which uses a search form (allowing wildcard
searches on several fields) frmApplicPerFind to look up an applicant's
name and fill in details in fields in the main form. The code I am
using on the search form to copy the data is as follows:
Private Sub Command22_Click()
'Sets the Applicant name in the project form to be the same as
the record clicked
Forms!frmProject.txtApplicant = Forms!frmApplicPerFind.FirstName &
" " & Forms!frmApplicPerFind.Surname
'copies the matching person ID into the project record
Forms.frmProject.ApplicPerID = Me!PersonID
'Close the search form
DoCmd.Close acForm, "frmApplicPerFind"
I want to use the same search form from a sub form on frmProject which
will display a list of other people associated with a project. (In
this case I only want the table behind the subform to hold the IDs for
the people and not their names as well). What would be the best way to
use the same search form for both searches as the code will be
different depending on where the found data is to be copied to?
On this subform I want to store only the ID but to display the name.
Can this only be done through a combo or is there some other way? In
this case I will not actually be needing the functions of a combo as
the search form will be providing the look up facility and using one
could be confusing for a user.
Chris
searches on several fields) frmApplicPerFind to look up an applicant's
name and fill in details in fields in the main form. The code I am
using on the search form to copy the data is as follows:
Private Sub Command22_Click()
'Sets the Applicant name in the project form to be the same as
the record clicked
Forms!frmProject.txtApplicant = Forms!frmApplicPerFind.FirstName &
" " & Forms!frmApplicPerFind.Surname
'copies the matching person ID into the project record
Forms.frmProject.ApplicPerID = Me!PersonID
'Close the search form
DoCmd.Close acForm, "frmApplicPerFind"
I want to use the same search form from a sub form on frmProject which
will display a list of other people associated with a project. (In
this case I only want the table behind the subform to hold the IDs for
the people and not their names as well). What would be the best way to
use the same search form for both searches as the code will be
different depending on where the found data is to be copied to?
On this subform I want to store only the ID but to display the name.
Can this only be done through a combo or is there some other way? In
this case I will not actually be needing the functions of a combo as
the search form will be providing the look up facility and using one
could be confusing for a user.
Chris