Problem passing value to unbound subform

Joined
May 9, 2007
Messages
1
Reaction score
0
I was recently asked by a friend to create a database for a very small towns police department to hold their case information. They had an old DOS program and wanted their data converted. I haven't used Access since Access95 but it was a nice change from being retired so I accepted. Most of the program is working great but now I am afraid I am at the end of my skill level. I am working in Access 2003.

Here is the scenario:

I have a mainform bound to qryCases. The query links several tables containing the main information about each case - case#, name, date, location.

The mainform has 3 tabs. On the first tab is a bound subform which shows a continuous form view of qryCases. Once they select a case they can go to the 2nd tab which has subforms that show the contents of each table for editing based on the button they push (ie, People of Interest, Property, Case Details).

If they want to search for a person but don't know the case the person is associated with then they can go to the 3rd tab on the mainform. The 3rd tab has an unbound form called SearchContacts. On this form they can either input any or all of 4 search items - Date of Birth, Sex, Name, or Location and then hit a Button to filter the data and it will list all People on file that match those search criteria, or they can leave the search fields blank and scroll through a list of all people on file.

The 3rd tab also contains a bound subform "PeopleUpdate" that links to a text field on the Mainform called SearchID whose control source is "=SearchContacts.Form!id". The "PeopleUpdate" subform contains bound subforms linking to ID their respective tables (Notes, Prior Arrests, Cases, etc). When the user selects a person on SearchContact they can view all the information about that person by paging through the subforms on the PeopleUpdate subform.

My PROBLEM: They would like to be able to select a case on the mainforms Tab 1, go to Tab 2 and look at the People of Interest in the case, select one of them and then go to Tab 3 of the mainform and have that name appear in the Search field "Name" on the SearchContacts subform. Currently they have to copy/paste the name from the People of Interest into that search field on SearchContacts and then hit the filter button and from there they can page through the subforms in PeopleUpdate. If they are not on the People of Interst form then they want to be able to search normally on the SearchContacts subform. I thought if I could get the name of the person from the People of Interest form to a field on the mainform then I could pass it to SearchContacts and put it into the search field "Name". I have tried every combination I can think of but can't seem to pass the data from the mainform to SearchContacts.
 
Last edited:

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