2 ways to search thru records with combo box

Posted on 2012-08-10
Last Modified: 2012-08-13
am attaching a sample database with 2 forms.
open database and open form1-
I have  code in combo box.
   [Dim rs As Recordset
  Set rs = Me.Recordset.Clone
  rs.FindFirst "[ClientID] = " & Me.cboSelectClient.Value
  If Not rs.EOF Then Me.Bookmark = rs.Bookmark]

I realized I can also create with the wizard (form2)-the same type of search.

question: they both use the same query in the row source of the combobox.But I don't understand how form2 can work without the code that form1 has.
Can you explain the differences of the two forms?
thank you
Question by:davetough
    LVL 61

    Expert Comment

    Your second form is using an Embedded Macro that does effectively the same thing as the VBA in the After Update event of Form 1.

    Here's a screenshot:
    Embedded Macro
    LVL 61

    Accepted Solution

    As an aside, embedded macros are new to Access 2010.

    My personal preference is still VBA like you have behind Form1.  I find it easier to develop, better organised, and find the error messages more meaningful.

    Author Closing Comment

    Thank you- ( apoligize for delay - purchasing new computer)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now