Definitely possible. You'll need a little bit of VBA to make this happen though. Here is a good tutorial: http://www.techrepublic.com/blog/mso...selection/1330
1. You need to do is set up a query that grabs all of the data you need for each ID number. Use the Query Wizard to set that up. So for ID 1, you'll have info from the STI table, TB table, HIV table, all on one row.
2. Create a combo-box on your form that selects the ID. The combo-box should be based on the query from Step 1. Although the combo-box will only show ID after everything is selected, you'll need the entire query for later steps.
3. Make an event for the Yes/No field After Update to trigger the Email and Mailing Address text boxes to "auto-fill" based on the ID. You will need the Code Builder. The code you need will be similar to the tutorial.
Assuming your query looks like this:
ID |
Name |
Mailing Address |
Email |
STI |
TB |
HIV |
1 |
Bob |
1 Main St, Anywhere, USA 12345 |
bob@comcast.net |
x |
x |
x |
2 |
Joe |
2 Main St, Anywhere, USA 12345 |
joe@juno.com |
x |
x |
x |
3 |
Tom |
3 Main St, Anywhere, USA |
tom@aol.com |
x |
x |
x |
Combo-box ID should connect to the Contact Master table. Call it "comboID" on your form.
Yes/No After Update code should look something like this:
Code:
Private Sub comboID_AfterUpdate()
Me.textMailing_Address = Me.comboID.Column(3)
Me.txtEmail_Address = Me.comboID.Column(4)
End Sub
Hopefully that works. If not, the Mailing Address and Email Address text boxes may need to use DLookup instead.