I may have bit off more then I can chew on this one but I am getting really close to having something that is usable. Here is my question:
I have a form names Contract Search where I have implemented The "Cool Search Tool" from this post:
http://www.access-programmers.co.uk/forums/showthread.php?t=116253
I set it up so that the query pulls info out of 3 tables that are set up with relationships. I have a Contracts table that has the specific contract information and an Administrator and Customer tables that relate to the contracts.
What I am trying to do is set up buttons that will pull up the details of the specific contract when clicked. I got it to work for the Contract table but Administrator and Customer wont work. This is what I have for contracts:
My thought is that based on my query, the data that is stored in "QuickSearch" is really the contract number. The following is my info for the table:
I am gonna keep on searching and reading the forums but it seems like I have been at a dead end for the past hour or so. Any ideas would be helpful. Thanks!
I have a form names Contract Search where I have implemented The "Cool Search Tool" from this post:
http://www.access-programmers.co.uk/forums/showthread.php?t=116253
I set it up so that the query pulls info out of 3 tables that are set up with relationships. I have a Contracts table that has the specific contract information and an Administrator and Customer tables that relate to the contracts.
What I am trying to do is set up buttons that will pull up the details of the specific contract when clicked. I got it to work for the Contract table but Administrator and Customer wont work. This is what I have for contracts:
Code:
Private Sub Command73_Click()
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Contracts"
stLinkCriteria = "[Contracts].[Contract Number] = '" & Me![QuickSearch] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
End Sub
Code:
Private Sub QuickSearch_AfterUpdate()
DoCmd.Requery
Me.RecordsetClone.FindFirst "[Contracts].[Contract Number] = '" & Me![QuickSearch] & "'"
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
Else
MsgBox "Could not locate [" & Me![QuickSearch] & "]"
End If
End Sub