Search Orders based on Employer Name

bbznyc

New Member
Joined
Sep 9, 2004
Messages
21
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
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Just a thought -

Have you taken a look at the NorthWind database (an example which ships with Access) - there is a very similar routine in there.

Bernard
 
Upvote 0
Hi BN
Couple of things...
What is the error?
What line of code errors?
It is impossible to work this out from your download because all it has is the first form, it contains no data sources and no other target form.
Jim
 
Upvote 0

Forum statistics

Threads
1,221,816
Messages
6,162,149
Members
451,746
Latest member
samwalrus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top