Ms Access Dynamic Menu

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi today we will show you how to make a kind of a side menu like this form okay we click on like department we can see the department and the mouse over is uh is moving right the color is changing then the the the menu selected will be will be colored like this one here because it get green we show that it is this department or this menu is selected okay if you click on case by example you will see the cash also will remain selected so how to do something like this okay so we will show the video quickly how to do that first i will create a new ms access application to show you access then we create a new table a new database sorry here i will click blank database okay then i will give the name uh username side menu db okay then it will save in my document create here is the menu the first page of the database then we go quickly and create a blank form okay since the blank form is created let's go to the design view and make it a little bit bigger then let's save to give a name we call it menu f by default we have a kind of convention here the way we naming forms or reports from at the end of the name we put f to show this form then the report we will put r on the right side okay so that's kind of uh convention we are using here let's go and click ok so the menu is created so let me create the dark side as the sorry for my computer is running something else it's a little bit slow so we take this rectangle here then we put a kind of rectangle okay rectangle on the side here then we go to format the fill color we choose this kind of black okay it's simple if you want you can go click this one you can go to advanced color and choose more color okay more color then you can find a color on the internet to get the rgb of the color and you apply it here it's very easy it's simple so now the color is on the top so let's try to find a color the color already on the left that's fine for the top one let's find the color for the top so now i will show i will uh how to make a the top one i will just simply create another rectangle okay then i will give another color like a let's go to this color by example okay so here i can extend this color to the top right side to make it a little bit more uh good then i will just simply put another rectangle that's for a design purpose okay so here i will put something like this and then i will put its color to this white okay so you see it's kind of designing you you have to think or check the the google side to see different kind of menu people are creating uh to get to be inspired of it okay so let's now create the button i'll create the first button here okay so i will cancel this one to show me the wizard so i will remove the name or i will put here uh menu sub menu one okay sub menu sorry server menu one okay new so my keyboard is a little bit okay sub menu one then i will try to format it to make it black color is transparent okay you need to put the black color transparent uh sorry you need to put the back color as same as the menu on the left side okay see now it's fade inside the menu of the left side then the typing we put a white color we increase the size a little bit okay to 16 then the watercolor you see is visible okay i don't want kind of a brighter color i would say also transparent okay now the butter color sorry it's not getting transparent it's getting white let's say transparent so we don't know why it's getting selected it's kind of uh there's no bug the border color the shape color you see is taking the blue by default okay the border color transparent i don't know why it's not responding okay it does not matter we could just go to the way what we can do with this pattern then i will simply uh try now to copy the button ctrl c and ctrl v okay six to seven six to seven times then i will how to call make it uh rename it if each button should have a convention name like the b by like button b1 b1 then i will select the b2 here to make it b2 and then i will set here to b3 and so for that and then before okay here's b five here it's b six and then here is a b7 okay so now we see that we have seven button we can easily how to call make it disappear visible first we select all the buttons here we make them visible sorry visible true is is better if visible two is better then we go to the code okay we click uh we go to code builder database tool we go to visual basic then side menu there is no object created no there is a objective created let's say this to let the system create okay now now we are in the form current we don't need this current we just create a private function okay to do that provide function uh how to call set bt uh set bt only okay then we enter then we go to the middle here we save for i the first one for i it's equal to one two seven seven we have seven button i think one two three four five six seven okay seven button okay one two seven for i is one to seven for i want to seven next then we put here [Music] mean okay we open the parenthesis mean the code then we put b the initial of our button and then i cover dot okay back color black color is equal to our first box you see this first box is zero the name is box zero this first see this first box we created it name is box zero okay we use box zero color boxer zero dot black color okay so this is to clean up okay if i select something that selection should move otherwise uh we going to run into the trouble if we don't clean up what we have done after the code so now we said me that active control that back color active control it doesn't exist but we have to continue what color is we try to find a good color like uh this color box one dot color or we took from here the code rgb code of that color you see this color we can put to this side and check the rgb is 167 two one eight that that then we don't need a just said box one okay make it things easier box one okay dot by color all right so the selected one will be box one black color so this function we call it here this the name i'll copy the name copy copy all this copy then we click the first second third until the last button if you select all we can to event then we click inside the event not double click just click and then we make recall to our function set bt then all the button will have this functionality let's try the code if there is no bug okay click here object does not support or let me check what mistake we have done private function set bt for one to that black color is boxy zero that black color active control see we forgot back color here it's not bad color let me check okay see it take the color and then the guy if we move this guy here we see what happened okay i click here it remain green also i click it remain green that's the problem that's why we put first this loop here to clean up everybody to get back to normal only the one selected active control item to be how to call selected as the the header then we want to set this page to open here in access you should avoid creating many forms you can easily create a tab here okay a tab here i will put it up then i will put seven tab also from one to seven then i will say insert page insert page answer page to seven times okay one two three four five six seven then we click here we give the name also our serial number p like a p1 the name sorry the second one okay this one will be p2 this one will be p3 this one will be p4 p4 this one will be p5 and this one six okay and the last one p7 okay yeah so this menu will make sure you make your menu or your access uh very very nice and clean and and lighter okay so we what we do we want to make this tab transparent okay we go to format we make it transparent as you see then we make a level here okay level here to the form except not inside okay then i will name it lb 0 lb 0 okay so we will format it to make it to bigger writing 20 and the writing may be blue okay and then the border color of this one will be articulate transparent okay let's say we make it bigger like this okay then if you click here the menu like you said here we make caption many two menu three mini four any name we like only five minute six menu seven here in the caption you can put anything you want okay you do not need to make a serial numbering here you do not need at all if you like the first one you may remove it we say welcome okay then you want if you click sub menu here it will show the caption on this sub menu to show on this level for each page so that's why we will not put this level on each page one by one let's make it a lot of job a lot of problem a lot of time and a lot of loss of money okay because if you cannot build even a single application in two three months that means you're losing money okay so let's go to the code our function we do let our function do everything the simple function we created here we page we have limited page okay then the active control we have to catch up we have to take the value of that active control click it okay we declared the ax okay as single okay okay pixel as a single okay then we put here a x integral it is uh how to call we say okay mid okay or or left or right okay right right of active control me that active control okay active control we forgot to say right one okay right the position one we suppose that we don't have ten button if we have ten button that's mean the right can be from one to ten to two digit or one digit that is another smart code we have to input here to calculate how to grab the number on the right side of the button okay one so here is that then i will change c s and g that means convert to single okay c is indeed mean because this guy will return a text i need to convert to give to this guy here which is a single okay since we grab this one the the number of the button clicked we said now just simply copy or sorry all this no we don't need to copy that but let's do that okay ax then we change also this one to p because we have the p okay that set focus okay focus okay that's mean we grab something here if bit on button five is clicked here we have five in this ax then we said combine this five you got to the p then it is the element of me then give it the focus okay then our lb 0 is named our lb 0 dot caption okay we set it to our this one this one uh sorry this one okay uh we make it because we are my friend of error we said okay here we put b then we combine also to ax okay in that caption okay that's mean the the number here if you click b5 because here i'm afraid if we take active control that time that control do not have a focus again because this reset set focus so this one will not get any more focus so that's mean only this ax will save us from this problem then we have to take ax combined to b because our button from one to b1 to b7 so it will take b and 5 here dot caption then we give to lb 0 let's try the function okay very easy okay now menu sub menu 5. we make something not common here let's check the error me lb0 that caption ok is me may x v here that he said p um you cannot see what's what's the error what's it say click here it say the exclamation mark click object does not support this property or method which one okay let's support that i think it's support let's say let's try to save it is not that guy i'm sure it'll be zero also i think is a lv0 the caption is like that okay we can set the caption of any button lb0 is a text box okay that's mean let's say uh active control write message box okay ax to check what the value in the a is maybe we missed the value of the x we missed the value of ax a x let's close all this okay object it is not up here write me active control dot name make mistake okay i think was the problem because we net you need to say dot name not active control only okay we say sub menu three sub menu six sub many to and sub menu so no one will know so now in the client side you will not see sorry you not see all those page number just have to make it high okay no okay see known then all the pages are here you can even remove the border here you go the color you said with the color transparent okay then yeah see the color no one now let's make it however color okay that's very easy there's no need there's no code for that simply take select all of them and then come to format you come to here however color then we said however color is a yellow okay however for color will be how to say black okay message color we don't need that we try as you see we have our color we click the menu and then the job is done the page is selected if you want another page another group of page here like this tab okay let me show you the title of the top like this tab like this tab one two three you need to you need to have a sub menu here belong to this period like okay if i'm in p1 the space is is small for me i can put here another sub menu which i can control with the code again is like that we build that application we put another one here then we can provide you can say this one p one okay p1 okay sub 1 s1 we call this guy p1 s1 sub the p1 page sub page 1 you can say also p1 sub 2 that mean we can grab also any page belong to the p1 should show up if p1 show up okay you can create 2 3 5 6 sub page for p1 maybe zero sub page for p2 okay etc you can do whatever you like just you cannot be out of space here there is a lot of space because the tab is working like another different form and then it's easier why because if you have one like uh username here or user information it will be directly in this form you don't need to say that form that form dot dot what dot field you don't need because all are in one form okay so it is also how to call very fast very light okay you can link this p1 to these two table tabs here if p1 is selected they show up if p1 is not selected they hide it so that is possible use that we do in our database example here you see this one this side is a subtop okay it okay if i go to hospitalization you can see it is another sub tab which is from the right side we tell him to come back to come to the left side to show up on the left side because it is so big from the screen we adjust the position also because it main tab is clicked so the sub tab will show up if you click here this is the question number so it will go to the first page page zero and then to show the sub page of that one also so you see is very easier very light to manage thank you for following our video we will make the second video will be how to make a parameter for the database how to make this if we click here then if you don't have the right to come to this page so that it will be a message to say this page is reserved for a higher level okay you can set the permission of each menu one by one because we suppose that this is the menu how to add item this is the menu for supplier this is the menu for to sell this is the menu for inventory this is the menu for general report so you have you can fix a setting you can fix a level for each menu then if you click uh it will check first your level the login level then apply to the menu okay so thank you for following our video have a nice
Info
Channel: Sissoko M. Prodev
Views: 154,407
Rating: undefined out of 5
Keywords:
Id: W9A6Jj-aE6E
Channel Id: undefined
Length: 27min 50sec (1670 seconds)
Published: Thu Aug 20 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.