michellerobinso
Registered User.
- Local time
- Today, 21:12
- Joined
- Jun 14, 2006
- Messages
- 47
please see the example attached, it is a very basic search, double clicking on the return number opens that record.
what i would like to do is show the account name and date is the same box.
below is the code that i use. can someone please someone help me incorporate something into it?
rivate Sub cmdSearch_Click()
On Error GoTo Err_cmdSearch_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSearchReturn"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdSearch_Click:
Exit Sub
Option Compare Database
Option Explicit
Private Sub List2_DblClick(Cancel As Integer)
Dim rs As Object
DoCmd.OpenForm "frmquery"
Set rs = Forms!frmquery.Recordset.Clone
rs.FindFirst "[RETURN NUMBER] = " & Str(Nz(Me![List2], 0))
If Not rs.EOF Then Forms!frmquery.Bookmark = rs.Bookmark
DoCmd.Close acForm, Me.Name
End Sub
Private Sub TxtSearch_Change()
Dim vSearchString As String
vSearchString = Me.TxtSearch.Text
'Me.txtSearch2.Value = vSearchString
'Me.List2.Requery
'Err_cmdSearch_Click:
End Sub
what i would like to do is show the account name and date is the same box.
below is the code that i use. can someone please someone help me incorporate something into it?
rivate Sub cmdSearch_Click()
On Error GoTo Err_cmdSearch_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSearchReturn"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdSearch_Click:
Exit Sub
Option Compare Database
Option Explicit
Private Sub List2_DblClick(Cancel As Integer)
Dim rs As Object
DoCmd.OpenForm "frmquery"
Set rs = Forms!frmquery.Recordset.Clone
rs.FindFirst "[RETURN NUMBER] = " & Str(Nz(Me![List2], 0))
If Not rs.EOF Then Forms!frmquery.Bookmark = rs.Bookmark
DoCmd.Close acForm, Me.Name
End Sub
Private Sub TxtSearch_Change()
Dim vSearchString As String
vSearchString = Me.TxtSearch.Text
'Me.txtSearch2.Value = vSearchString
'Me.List2.Requery
'Err_cmdSearch_Click:
End Sub