tsamptrail
New member
- Local time
- Today, 13:19
- Joined
- Jun 4, 2007
- Messages
- 5
Ok, please be patient with me. I have created a database to keep track of all associated information dealing with a new Secure Data transfer application that we are just starting up. I have everything working the way I want it to except for one thing and I am totally lost on why it will not work. If this information is not what you need to help me, just let me know. I am new to this.
The will try and explain how it works. When you first open the database the Administrator Identification Form opens requiring two things.
The user chooses there Admin ID from a drop down list and then types in the Partner number. After the partner number is entered the user hits the enter key and the Client Information Form opens.
At this point everything is linked together. You can click on the contacts command button and the following table opens allowing you to enter contacts that are associated only with the Partner Number you originally entered.
Now comes the issue. If you click on the User E-mail command button you see the following:
This is were the problem comes into play. I would like to be able to have only the Contact Information associated with the Partner Number in the list box were you currently see the 226. At this time you see the entire list of people in the contact information table.
Code that does not work for the User E-mail command button
Code that Does work for the Contacts command button
Thanks,
tsamptrail
The will try and explain how it works. When you first open the database the Administrator Identification Form opens requiring two things.
The user chooses there Admin ID from a drop down list and then types in the Partner number. After the partner number is entered the user hits the enter key and the Client Information Form opens.
At this point everything is linked together. You can click on the contacts command button and the following table opens allowing you to enter contacts that are associated only with the Partner Number you originally entered.
Now comes the issue. If you click on the User E-mail command button you see the following:
This is were the problem comes into play. I would like to be able to have only the Contact Information associated with the Partner Number in the list box were you currently see the 226. At this time you see the entire list of people in the contact information table.
Code that does not work for the User E-mail command button
Code:
Private Sub ContactID_GotFocus()
On Error GoTo Err_ContactID_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ContactID"
stLinkCriteria = "[Registration Number]=" & Me![Registration Number]
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit, , Me![Registration Number]
ContactID_Click:
Exit Sub
Err_ContactID_Click:
MsgBox Err.Description
Resume Exit_ContactID_Click
End Sub
Code that Does work for the Contacts command button
Code:
Private Sub Contacts_Click()
On Error GoTo Err_Contacts_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "ContactInformation"
stLinkCriteria = "[Registration Number]=" & Me![Registration Number]
DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormEdit, , Me![Registration Number]
Exit_Contacts_Click:
Exit Sub
Err_Contacts_Click:
MsgBox Err.Description
Resume Exit_Contacts_Click
End Sub
Thanks,
tsamptrail