?
Solved

More Problems on Record Search Combo

Posted on 2011-05-03
10
Medium Priority
?
477 Views
Last Modified: 2013-11-27
In reference to my last post:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Access_Coding-Macros/Q_26981971.html

The conversion of embedded macros to code did not produce the desired results:  All I'm wanting is to have my form record search (textbox and combo box) perform as shown on many MS Access Templates.  Conversion of the macros did not do the trick or maybe I screwed 'em up someway.  

Could someone please review the above link - previous post, and also the attached db.  
The code was not 'commented'  for me to see just exactly what was going in reference to the Form Load, cboGotoContact After Update and On Got Focus.  

Many thanks in advance....
 Salon-A.accdb
0
Comment
Question by:zpotok
  • 4
  • 3
  • 3
10 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 35568518
test this


Salon-A.accdb
0
 

Author Comment

by:zpotok
ID: 35694911
capricorn1:

Why didn't the macro conversion work in the after update?  What good is the conversion if it doesn't work???

I still will need to have the combo to clear itself after selection is made as is shown in most all of the templates.  What needs to be added?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35695158
Converting macros to VBA does just that...
...It converts the Macro to VBA.

This means that you must take this "converted code" and put it on your event (or where ever it is needed) *manually*.

Here is a tip:

Create a DB in the Access 2003 format.
Use the wizards to create every type of code functionality you may need.
(This will generate code, not macros)
Save all of these codes to a notepad document with comments.

Now you will have this as reference code for all the wizards that you can re-use.

Where you need to create macros first, immediately convert them to VBA and immediately copy this code to your notepad document with comments, also.

If you need automation to do something and you don't know how to write the code, post a question here asking how.

Practice writing and modifying the reference code.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:zpotok
ID: 35703321

 "Converting macros to VBA does just that...
...It converts the Macro to VBA.
This means that you must take this "converted code" and put it on your event (or where ever it is needed) *manually*.

I did this and tried putting it in my event.  Obviously it didn't work and that is why I turned to EE for a solution.  Capricorn1 did not completely answer my question - if you would completely read it over. It would seem that some 'experts' would rather concentrate on getting the most points with the minimum amnount of effort.  
I will not be awarding any points thus far because my question has not been answered in it's entirety.  I've posted 1500 points related to this issue and still the 'experts' can't seem to resolve it.
What  I don't need is a 'lesson' on figuring things out for myself...

 
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35706476
<All I'm wanting is to have my form record search (textbox and combo box) perform as shown on many MS Access Templates.>

Then I am a bit confused.
The sample you posed here *does* perform the way that is shown in "many MS Access Templates."
You select the value from the combobox and the form finds that record.
This is the way many ms sample function, this is the way your sample functions, and this is also the way capricorn1 sample functions...

Can you point to a *specific* MS template where the functionality is what you are looking for?

<I still will need to have the combo to clear itself after selection is made as is shown in most all of the templates.>
Again, please point to the specifc MS Template that does this, as this is not the common way this is done.
In fact, I don't know why you would want to clear it, ...when you make a slection in a combobox, most of the time the value remains visible untill you change it.

Furthermore this violates the very functionality you are requesting.
If the combobox is to "Find" the record you select, then if it "Clears itself", then the cobobox will try to find a "Cleared" record.

Again, please point to a specific MS template where the functionality you desire is demonstrated.

Thanks

JeffCoachman



0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 35706629
<It would seem that some 'experts' would rather concentrate on getting the most points with the minimum amnount of effort.  >

this is a comment that i really hate to see, coming from a somebody asking for help.
fyi, all experts here are volunteers. no one gets paid (not even a single delapilated penny).

* a single thread is only for a specific question/problem
   

<What  I don't need is a 'lesson' on figuring things out for myself...>
  _ this is not a place for tutorial
  * i advise you to take an Access course
 

good luck to your project!!!
0
 

Author Comment

by:zpotok
ID: 35713019
JeffCoachman:

Can you point to a *specific* MS template where the functionality is what you are looking for?

The link shown above references The 'Faculty' Template.  You can also find the same situation with the Time and Billing Template, Northwind 2007 and on and on....  All of these use a combo box (cboGoToContact) and also a Textbox.  When selection is made in the combo the text box displays the name selected in much larger font and then the combo is 'cleared' ready for another selection.
Of course the TextBox does not clear until another selection is made.  
Like I said this seems to be standard for many (later) ms access templates.  
The problem is and always was is that the combo and form load uses Embedded Macros.  I did not wish to use the Macros and was not able to convert them to vba due to a bug in ac2010.  Capricorn1 converted these but the AfterUpdate property did not work - this was all posted earlier.  
Capricorn then whet the fast, easy route (abandoning the  macro conversion) on the cbo AfterUpdate.  This shorter approach did indeed work but it did not clear the combo as the macros did and as shown on all aforementioned templates and many more.  

I don't know why this has turned into such a 'goat rope'.  I thought I had been very clear....
Please explain if you would.  Thank you
0
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 2000 total points
ID: 35713150
to clear the combo box, just add this line

me.cboGoToContact=""
0
 

Author Closing Comment

by:zpotok
ID: 35733188
I have to give an 'A' and yes only because the information I asked for and appears to be accurate.  I would definately give a 'C' for the hassle I went through to get this infomation.  This is not right and I did nothing wrong.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 35743291
You can give whatever grade you feel is appropriate...

Who said that you "had" to give an A?
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
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

807 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