How to Create Search Form Using VBA Part 2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello we'll come back to my another video tutorial in this video I we call how to create a church form part two I add the option we call select option which is the individual government nonprofit and listening these four of them we call a customer time we can select all or you can be seen on the previous video I show you how to create all this the search by keyword show all it show all the information for the customer table from the customer table here and customer they have a different type customer nonprofit business initial now if you wanna search we can search for some time for example we want to search for ma it come up with maple or coming in and master may see but this one we select all time from a four different time customer time everyone a search for justice individual thinking choosing a show or individual I am Disney and come out to business or just business is to a business customer sometimes we have a long list as a customer we just wanna search for is Thai or the specific time for that or we can slick all and so for I will show you how to do that search with the select option for the customer type we already have the source form on the part one right is look like this there's you know the part one now we want to add is my form we wanna add this the tight customer tie-in there on the part one they have the search by keyword from here I we need to copy and then paste and every rename it this suit is on the bottom here and then I go to design view and we expand this a little bit and make some space now we need to create four checks ball you see here we expanded rossabi we see this ball in a quick check ball and then drop in here and we name it individual and insert another table this name comment nonprofit now we have four different angle now we have all four tire customer just wanna format and then arrange it now you need to make the bottom one here a rectangle go over this full time okay the blinking here you will see the name on here on the check box I want to name this check check hidden dick check in and name the check - - to ask chk abuse this name and check this table check none now got this name I want to add another tool button here take whole let's cancel that and caption is slit all down save all command to to to deny and we just CMD silly oh and then add another button and so caption is D silicon and name is CMD D silly now we done with this you can be wet wave when we open the form we wanna show as a chip now we click on here click on format' when we open the form we will not see all this for mr. customer time I show as a check you go in the data sheet poverty sheet then you see Chara and default value here before where and we put two of them here through this min checks when you open you will see that check for you okay you see issue shake and you can see all and you can search now we next step we need to add the code into the select all and this sitting on let me quick you win save it all now we can just put a dot check see here in D equal to check this Lee equal to check government equal to check nun equal to when you see the arch check is me in all this chain now we want to put the same thing on this silikal did series ami dot check this name equal to four shape government check in eco individual into perform doesn't matter the the oil is okay we have already for non equal to four now we done with that and try it now we have to check when you open we put this week all not all the chicks cone and you can put it back by silicon that's your good now the next step we want to put the code in here under the choose button we revise the code in this before that we have original doesn't have any option or select option now we need to put this with option in here maybe you the same code in there and we put some code the eve statement here if me dot checks individual equal to true when we open it Institute in individual equal to 1 in E okay when is confirm individual and equal to one we need to set the Bible theme individual as now India why individual equal to 1 EP code 1 we go back and check on the customer table customer table here we have a customer time when we go in this I've you see customer time is show a Dora is number body because look up the data look at the customer tie ID formed customer time table open here you see individual equal to 1 the ID one that's linked to the table customer time government to business 3 non-profit for you can see relationship here table customer see you can see the customer table link it to customer time table idea is linked to the primary customer that Heidi is primary key of a customer hi table which is linked to that anyway we go back to the code we know it's an integer and the number and will be for the same thing do with this need as integer name government game nonprofit now we get awful now we stop it if again give me dot check this need equal to true then this is equal to 2 nd we shaped on the customer tie here AB is not equal to 3 common equal to 2 vision + 3 check government show them and if we dot non equal for equal to two first and then half it ok the Bible here nonprofit equal to four equal to do ID for here and then in deep now we got all the if statement here we test if is not the box you know the chest Bob is not new on and we go to if check and then we need to put add some code over here Pacific all from customer table where need to add here a customer tie ID iko iko another lie individual is over here if the number or in the year we don't need this we don't need a single call we just need a double hole here Oh put this on the scene here where this come from customer ty ID is come form the the customer table which is over here you see customer ty ID represent link to customer time individual government now customer ty ID equal to individual over here and now going to be equal to or equal to business we just copy here copy and paste it over customer ty ID equal to this name and this is all press the game for the multi ID equal to compliment on nonprofit and we cause we have to from here to here is four different tire customer time we use all and now we need to be provable we close another parenthesis and now we use an and and then customer name like that from the cheese ball okay look I go we done on that close it we will be show here using me for testing so we gotta air from here to the bucket okay probably too many parenthesis make sure that we have one from here and one from here choose see it's working we have too many closed parenthesis now we do you see it always search it it got nothing because we have nothing to select under customer time this way individual hand researching come up with the inertia we don't have an individual box here we don't know is individual not you need to take all this one and we can insert here they got this one it is estimate I'm here and delayed the phone and the customer time okay so see how we got this now we check on Miss name we search it how about way to business and we do issue and click on it have nothing on government um lab number faith we got none nonprofit okay we have it we have a Joan - lets you have all the individual so it all have nothing is working good and hopefully you use this method or this logic you know you can create for any type of the data in your database it's not just search for the name because we have a channel search for the name and now we narrow down by silly or district option Don customer time here we can narrow by select customer time for the customer name and thank you for watching
Info
Channel: T Golden Eye
Views: 50,627
Rating: 4.9735098 out of 5
Keywords: search form, how to, access, ms acces how to, create seach form, search wih vba
Id: G1ZV9ngQoVM
Channel Id: undefined
Length: 22min 24sec (1344 seconds)
Published: Wed May 21 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.