Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comments please, on the proper way of handling this

Status
Not open for further replies.

GAORR

Programmer
Nov 22, 2001
48
CA
I'm having a problem that I hope someone can comment
on (if you can follow what I am trying to say here).

I will try to explain.

I want to provide a search feature in my project (similiar to 'Word' or 'Excel') and although it is working fine,I suspect it is not the proper way to do it.

1. I have a form - 'Customer'
it offers 3 ways to select a customer
-by entering a customer password (ID) or
-clicking a last name in the combo box or
-clicking the 'Find' button and doing a search
-all methods retrieve the data and loads the customer data to the text boxes on the form.

2. I have a another form - 'Search'
this form is displayed when the 'Find' button on the 'Customer' form is selected (the 'Customer' form is now inactive).
the user then selects the type of search and what to search for ie: exact match, leading or anywhere
***** Keep in mind the following code is all found in
***** the 'Search' form
when the 'Find Next' on the 'Search' form is selected, the combo box from the 'Customer' form is searched and if/when a match is found, the customer data is pulled from the db (using the business and data tiers) back to the "search" form which then loads the text boxes of the 'Customer' form.

This all works fine. My concern - that this is not an
acceptable way of doing this ie: accessing and loading controls for a form (Customer) from another form (Search).

Thanks in advance for your comments.

 
The way i used to do this was to obtain a Clone of the display form's underlying recordset then pass it to the search form after synchronising the Bookmarks of the two recordsets. The I used the FindNext, FindPrevious etc. methods of the cloned recordset in the search form. If I obtained a valid match, i'd set the Bookmark of the recordset on the display form to that of the one in the search form. if not, I'd pop up a message saying it couldn't be found. This seemed to work OK.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top