Hello to all, again:
I have another problem. I am extending the use of database by implementing a search function for orders, this way the orders can be edited later on. The Idea is this: I enter in the search employers name and i get in the menu below the list of all the orders/date/comments associated with that employer and when dbl-clicked opens up the actual order.
-------------------------------------------------------------------------------------
Private Sub List2_DblClick(Cancel As Integer)
Dim rs As Object
DoCmd.OpenForm "Orders"
Set rs = Forms!Orders.Recordset.Clone
rs.FindFirst "[OrderID] = " & Str(Nz(Me![List2], 0))
If Not rs.EOF Then Forms!Orders.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
End Sub
-------------------------------------------------------------------------------------
when i use this code, i get an error... any idea?
i attached a copy of dbase... please help!!!
http://home.mindspring.com/~bbznyc/db1.zip
I have another problem. I am extending the use of database by implementing a search function for orders, this way the orders can be edited later on. The Idea is this: I enter in the search employers name and i get in the menu below the list of all the orders/date/comments associated with that employer and when dbl-clicked opens up the actual order.
-------------------------------------------------------------------------------------
Private Sub List2_DblClick(Cancel As Integer)
Dim rs As Object
DoCmd.OpenForm "Orders"
Set rs = Forms!Orders.Recordset.Clone
rs.FindFirst "[OrderID] = " & Str(Nz(Me![List2], 0))
If Not rs.EOF Then Forms!Orders.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
End Sub
-------------------------------------------------------------------------------------
when i use this code, i get an error... any idea?
i attached a copy of dbase... please help!!!
http://home.mindspring.com/~bbznyc/db1.zip