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 too. 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.
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 editting based on the button they push (ie, People Related to the Case, 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, txtFilterMainName, 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 Cselect_ID 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 "txtFilterMainName" 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 "txtFilterMainName". I have tried every combination I can think of but can't seem to pass the data from the mainform to SearchContacts.
tried this and get error message-
Me!txtFilterMainName.Value = Forms![mainform]![Cselect_id]