2 ways to search thru records with combo box

Posted on 2012-08-10
Medium Priority
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
  • 2
LVL 61

Expert Comment

ID: 38282446
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

mbizup earned 2000 total points
ID: 38282469
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

ID: 38287425
Thank you- ( apoligize for delay - purchasing new computer)

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

839 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