Hi All
I have some code which allows me to click on a contract no and then display the details for that no. It works perfectly for the first number but displays the first nuber details for all subsequent numbers.
Here is the code I'm using
Private Sub ContractNo_DblClick(Cancel As Integer)
On Error GoTo Err_ContractNo_DblClick
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmGeneralInfo"
If IsNull(Me.ContractNo) Or Me.ContractNo = "" Then
MsgBox "This record is empty", vbInformation, "No Data"
Me.ContractNo.SetFocus
Else
stLinkCriteria = "[ContractNo]=" & Me![ContractNo]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Exit_ContractNo_DblClick:
Exit Sub
Err_ContractNo_DblClick:
MsgBox Err.Description
Resume Exit_ContractNo_DblClick
End Sub
frmGeneralInfo has 6 tabbed forms to display all the relevant data. All the forms are unbound.
Any help much appreciated.
ChrisD
I have some code which allows me to click on a contract no and then display the details for that no. It works perfectly for the first number but displays the first nuber details for all subsequent numbers.
Here is the code I'm using
Private Sub ContractNo_DblClick(Cancel As Integer)
On Error GoTo Err_ContractNo_DblClick
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmGeneralInfo"
If IsNull(Me.ContractNo) Or Me.ContractNo = "" Then
MsgBox "This record is empty", vbInformation, "No Data"
Me.ContractNo.SetFocus
Else
stLinkCriteria = "[ContractNo]=" & Me![ContractNo]
DoCmd.OpenForm stDocName, , , stLinkCriteria
End If
Exit_ContractNo_DblClick:
Exit Sub
Err_ContractNo_DblClick:
MsgBox Err.Description
Resume Exit_ContractNo_DblClick
End Sub
frmGeneralInfo has 6 tabbed forms to display all the relevant data. All the forms are unbound.
Any help much appreciated.
ChrisD