Access 2010 How to create text search box

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome well if you watch my video on filtering with a combo box this is what we created here it was a detailed view of customers and when you click on the combo box and select name it would take you to that record however in this video here I am going to create a text filter it looks a little bit different the only thing I've done here is used a split form where I have the details on top and you've got to be able to bottom if you click on a record the details will reflect whatever record your you've clicked on from this is what we're going to create a peer though is this text box and where this comes in very handy is you can either in this case you can search company job title or customer name so if we type in V we can either hit the commit click on the command button or you can hit the Enter key twice either or will work so I'll hit the enter key place and it's brought up all of our records with the text Lee in it and important thing to remember is it's just searching text let's look for accountants and we'll click on that it brings up a counting well if you need to find a manager there you have it just a more efficient way of searching several records in several columns at the same time so let me go ahead and show you how I created this first thing I did you want to do is you want to create a query we're going to use the customer table here and what we'll search for is a last name first name and job title so let's go ahead and create a query go to the create tab and we're going to create a query in design view here so we'll click on that and we're going to add the customer table and we'll just click close and from from the table like I said we're going to use last name first name and job title and if you look at the query this is basically what you have there's no sort order or any filtering at this point we're just going to leave it as is and go ahead click close do you want to save changes yes I'm just going to leave it as query to click OK on second part is we want to create our form so what we're going to do is when they're a select query to go to the create tab and go to forms and in this particular case we're looking what we need is more forms if you click on that gives you some more options or forms when we're going to select a split form and click on that and here you have it basically you have a form with your details on top and your data view on the bottom whatever record you select and their details view it'll run on data view to bring up the details on top so what we need to do now is create our searches box up top here to do that I'm above it and right click on the tab go to design view and I'm just going to get this label out of my way so I have some room to work with and we are going to in this case we're are not going to use the control wizard we're just going to put empty controls on here so let's go ahead and click the text box and click on a button and talking them over here will swipe this out a little bit and they're pretty much done now we have a text box it doesn't do anything so let's fix that go back to design view and we'll click on the button and then your property sheet we want to click events and if your property sheet isn't if you can't see your property sheet - simply click on it up here and they will bring up your property sheet we want events make sure your button is selected and we want to click event go ahead and click on the little lips Asst we're going to build a macro so I'm going to click OK and it's going to bring you to your macro design view and if you click on this arrow area and it'll be long list of things that you can do but in this case we're looking for a apply filter so let's go ahead and click on that it's going to ask for a filter name or we're conditioned on a control name the only thing we're interested in is the where condition and the where condition is going to be last name and then we're going to type like because we're not looking for exact match and we need to put quotation marks past exclamation marks you're gonna type in X and we're going to be looking in forms exclamation on the form we're going to be looking in is the query to form which is what we created over here so we'll click that or double click that what's commission mode and we're going to be looking in the text box if we put on the phone there's only one text box or there's only one text box it's named te XT will click on that and we're also going to choose a wild character for the end so basically for searching for any text with whatever's in text box 12 in the last name column and you'll notice I've been here or over here let's go ahead click off of that it disappears at this point let's go ahead and close this Save Changes yes and we'll go to form view and if I type in leave up here and hit the enter key twice it filters out of all of our records with a last name of Lee but if I type in so and we'll bring this up nothing because we haven't wired up first name or job title yet so let's go ahead and fix that go ahead back to design view select the command button and we are going to select we lift this and simply what we're going to do is just copy and paste this what we wrote here is I'm going to hit ctrl C go to the end of the line and type in or a couple o R and I'm going to hit control V and once it won't calm in the type and/or space on control V and let's change last name to first loan well let's spell first right makes it easier and here we are going to change this to job title and that should be it so let's go ahead and close our last Save Changes yes put a form view and now we'll type in V and hit the enter key twice there's ly we type in so and we get the Enter key twice it just brings up that one record if we told one-way CC for accounting and double click brings up your accounting so we're searched we're able to search in job title first name and last name so basically that is the easiest way I can think of creating a search box on the form hope you found this useful thanks for watching and have a good day
Info
Channel: amorrill1000
Views: 408,101
Rating: 4.8054709 out of 5
Keywords: Access 2010 Search Box
Id: wCPs4aE5I2w
Channel Id: undefined
Length: 9min 41sec (581 seconds)
Published: Tue Jun 11 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.