Heenan, Lambert
Lambert.Heenan at AIG.com
Tue Nov 25 16:32:30 CST 2003
I think we understood your question. What we (well 'I' anyway) can't understand is what's do bad about hitting enter or TAB after selecting from the combobox? However, if you want to do search as they type you can. With the "conventional" way of doing this, typically, in the combo's AfterUpdate event this type of code will be run... Private Sub cboSearch_AfterUpdate() Dim strCriteria As String If Not cboSearch & "" = "" Then strCriteria = "Seller_ID=" & cboSearch With Me.RecordsetClone .FindFirst strCriteria If Not .NoMatch Then Me.Bookmark = .Bookmark End If End With End If End Sub But in your case you want to do this in the Change event of the combobox. The change event fires every time a key is pressed when the combo has the focus. So as the user types "12345" the code will first search for "1" then "12" etc. So, if you have a large data set, as slow network or fast users, you could well find that the search process cannot keep up with the typing of the users. Lambert > -----Original Message----- > From: Gowey Mike W [SMTP:Mike.W.Gowey at doc.state.or.us] > Sent: Tuesday, November 25, 2003 4:35 PM > To: Access Developers discussion and problem solving > Subject: RE: [AccessD] Auto Lookup > > Yeah I understand that is simple stuff, but that is not the part that I > am having problems with. I can get the form populated by the user > selecting from the combo box and pressing either the Enter Key or Tab > Key. What they want to be able to do is not have to press the Enter Key > or Tab key for the information to be populated automatically. Say that > they enter 123456 in the combo box manually, how can I get it to > automatically look up the record without the enter key or tab key being > pressed. What they want to be able to do is once the info is shown than > they want to be able to press the enter key and it will print the > mailing label (I have that part working just great)as long as they > select from the pull down list in the combo box. It's the manual entry > that causes a problem. I hope that makes better sense. > \ > \ > Mike > > -----Original Message----- > From: William Hindman [mailto:wdhindman at bellsouth.net] > Sent: Tuesday, November 25, 2003 2:24 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Auto Lookup > > > Mike > > ...this is pretty standard stuff ...both of these sites have sample code > and dbs that demonstrate different methods of getting the form populated > with a record selected from a combo box ...HTH :) > > http://www.mvps.org/access/ > http://www.candace-tripp.com/access_downloads.htm > > William Hindman > Government is not reason, government is not persuasion, government is > force. It is a dangerous servant." G. Washington > > ----- Original Message ----- > From: "Gowey Mike W" <Mike.W.Gowey at doc.state.or.us> > To: "Access Developers discussion and problem solving" > <accessd at databaseadvisors.com> > Sent: Tuesday, November 25, 2003 9:50 AM > Subject: [AccessD] Auto Lookup > > > > > > > > Hi All, > > > > > > I am trying to complete a project on a Mail Processing database. The > > one part I am stuck on now is some way for the Auto lookup of a record > > > everytime a number is put it. > > > > I have a form in which it has 5 fields, the first field is the ID of > > the person receiving the mail, the next four fields depend on this > > number to be filled in. > > > > What I need it to be able to do is as the user puts in a number it > > will auto check the table for the ID number and fill the fields on the > > > form with the underlying info with out the user having to press enter > > or Tab to have update or search, something like on each Key Down or > > Key Up. For example say the ID to enter is 123456, when the user > > enters the 1 it will do a auto check for a ID of 1 and when the user > > enters 2 it will do a auto check for a ID of 12 and so forth. > > > > I hope that makes sense. Thanks for any info or examples anyone has > > to accomplish this, if it is at all possible. > > > > > > Thanks, > > > > Mike Gowey, MCSA, A+ > > Team Leader - SRCI > > Information Systems & Services Division > > > > > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com