View Full Version : Passing fields and running queries on them


Adrianna
05-06-2002, 06:43 PM
Okay....I've got an HR database that I'm creating. I have a main form that allows me to enter in the information that is gathered though a resume.
Then I used that forms.employee record.last name, to pass the last name from the EMployee Record form to the Interview form. This is where I keep my answers to questions and such. From this form I have four additional forms that track education, computer skills, clerical skills, and something else.

Anyway, the problem is that I'm not able to keep this information tied to eachother. The idea works like cascading forms...which works fine, but when I query any of the following forms, I'm not able to retrieve data by the last name. I've tried creating a relationship on the last name ad in my key field, but that doesn't solve the problem.

How would I make sure that this information remains associated together??

Jack Cowley
05-06-2002, 07:00 PM
Use an autonumber as your unique record ID and Primary key. Surname is not a good choice because of the likelihood of duplicates. Create relationships between your tables as appropriate. Using the OpenForm method of the DoCmd object you can set a 'where' clause to open a form to a specific record.

DoCmd.OpenForm "MyForm, , ,"[ClientID] = " & Me![ClientID]