1 00:00:01,250 --> 00:00:03,009 how local taxes 2013 2 00:00:03,009 --> 00:00:07,378 you to roost over the next couple videos on going to be tempting to create 3 00:00:07,378 --> 00:00:11,049 a saw remotely purpose clearly that we can use as the basis 4 00:00:11,050 --> 00:00:14,750 a reports and also as the basis 5 00:00:14,750 --> 00:00:18,559 pov form and simulate booking details 6 00:00:18,559 --> 00:00:21,948 now known as do something in the eighties Cup live different 7 00:00:21,949 --> 00:00:25,929 I'm techniques a couple different functions in this video I'm going to 8 00:00:25,929 --> 00:00:29,099 explaining to you that the lookup function and how you can use that 9 00:00:29,099 --> 00:00:33,829 in a query so if you wanna play along follow the link below the video to 10 00:00:33,829 --> 00:00:35,420 download section a website 11 00:00:35,420 --> 00:00:38,899 and download axis 2013 the B-fifty 12 00:00:38,899 --> 00:00:44,920 and then we open at 10 okay so when I'm 13 00:00:44,920 --> 00:00:48,230 interested in is if we take a look at 14 00:00:48,229 --> 00:00:52,538 table booking details it is are we keep 15 00:00:52,539 --> 00:00:56,219 most useful information about a 16 00:00:56,219 --> 00:00:59,359 booking details fun enough including the check in date the check out today 17 00:00:59,359 --> 00:01:02,948 the room gonna see some notes and we're gonna be 18 00:01:02,948 --> 00:01:06,579 Krenek we reduce kinda base for for this 19 00:01:06,579 --> 00:01:09,819 I am dude bit by bit so 20 00:01:09,819 --> 00:01:13,779 like I said this particular video really folks in with the look of function 21 00:01:13,780 --> 00:01:17,228 so if you go to the crate to and click on 22 00:01:17,228 --> 00:01:21,478 query designed and for a moment just pick 23 00:01:21,478 --> 00:01:24,519 I am table booking details and had 24 00:01:24,519 --> 00:01:27,810 earned weekend 25 00:01:27,810 --> 00:01:34,689 the worst had cool information 26 00:01:34,688 --> 00:01:38,849 so what we've done is this replicate the original table what I wanted to 27 00:01:38,849 --> 00:01:42,589 companies at the lookup function for this is owen a column 28 00:01:42,590 --> 00:01:46,460 that indicates the cost per night over 29 00:01:46,459 --> 00:01:50,989 and the couple ways to do this I could actually just drop 30 00:01:50,989 --> 00:01:54,899 the room table in there used to cost for not then but then I wouldn't get 31 00:01:54,899 --> 00:01:58,259 show you the the lookup function so it's no good is it 32 00:01:58,259 --> 00:02:01,670 so what we do have I'm 33 00:02:01,670 --> 00:02:06,099 is a room I T which is here in my tsk and want to do is use for a mighty 34 00:02:06,099 --> 00:02:09,959 to go over to the room table terror group 35 00:02:09,959 --> 00:02:15,110 and to look up the cost per night for that particular very mighty 36 00:02:15,110 --> 00:02:19,010 that's why I wanted to and we use that the lookup function to do that 37 00:02:19,009 --> 00:02:22,389 so weeks go from here 38 00:02:22,389 --> 00:02:25,958 week lookin to this empty column computer 39 00:02:25,959 --> 00:02:30,479 and what we're gonna call this column will call it cost 40 00:02:30,479 --> 00:02:33,789 per night one perk kolam 41 00:02:33,789 --> 00:02:38,109 so is going to be the name it up to column and now this is gonna be 42 00:02:38,110 --> 00:02:41,590 the date is gonna hold and d 43 00:02:41,590 --> 00:02:45,950 lookup click on to the Diva Cup function takes 44 00:02:45,949 --> 00:02:51,848 to required documents and one optional argument the first acquired argument is 45 00:02:51,848 --> 00:02:56,049 I what food we looking for and I don't remember close-up 46 00:02:56,050 --> 00:03:00,680 usually this open actually so the food we want to actually returnees 47 00:03:00,680 --> 00:03:05,430 cool crisp Annika probably guest up to why take a chance a 48 00:03:05,430 --> 00:03:09,680 okay so it will cost per night so it needs to be within 49 00:03:09,680 --> 00:03:13,780 open/closed quotation marks and also it's a good idea to prove an open and 50 00:03:13,780 --> 00:03:15,140 close square brackets 51 00:03:15,139 --> 00:03:22,139 so it looks like this going so that filled return it 52 00:03:22,729 --> 00:03:26,030 the next than we did comma we say 53 00:03:26,030 --> 00:03:29,370 where it's coming from this could be the name of a table or query 54 00:03:29,370 --> 00:03:34,629 this case you're just interested in Table rooms and now we get to the 55 00:03:34,628 --> 00:03:38,068 optional part which is where we specify some kind of criteria 56 00:03:38,068 --> 00:03:41,219 criteria is 57 00:03:41,219 --> 00:03:44,789 the room I T past equal whatever the room I T 58 00:03:44,789 --> 00:03:48,878 returned by remote the FKS now on every single record 59 00:03:48,878 --> 00:03:53,539 the I'm gonna run this for today she viewing please ignore sin 60 00:03:53,539 --> 00:03:56,568 you know that one second for single record here 61 00:03:56,568 --> 00:04:00,429 I'm we have a different well not for 62 00:04:00,430 --> 00:04:04,080 everything recover from brick want to have a different room it. so remove work 63 00:04:04,080 --> 00:04:05,280 on the cost per night 64 00:04:05,280 --> 00:04:09,430 we wanna work out based on this for a mighty and he wanna work out based on 65 00:04:09,430 --> 00:04:10,360 this for my day 66 00:04:10,360 --> 00:04:14,019 through B-two's we go back to that the lookup function 67 00:04:14,019 --> 00:04:17,199 with another common and 68 00:04:17,199 --> 00:04:22,350 open/closed quotation marks I've per square brackets 69 00:04:22,350 --> 00:04:25,650 and its room ID equals 70 00:04:25,649 --> 00:04:29,329 now for an e-zine ampersand 71 00:04:29,329 --> 00:04:33,448 and room here 72 00:04:33,449 --> 00:04:37,419 to okay room high-t_ 73 00:04:37,418 --> 00:04:42,659 FK should actually be ok too close for practice anyway 74 00:04:42,660 --> 00:04:48,470 okay the press OK and get it to run it speak now we get the different 75 00:04:48,470 --> 00:04:53,770 cost per night the Sun explain that last bit too 76 00:04:53,769 --> 00:04:57,209 we've actually done is remind the FK 77 00:04:57,209 --> 00:05:00,379 refers to this field here remind TFK 78 00:05:00,379 --> 00:05:04,529 so if for example within the record that's number one religious a 79 00:05:04,529 --> 00:05:07,599 look up the cost per nine table rooms where the room I T 80 00:05:07,600 --> 00:05:10,889 his number one and if that's number two say 81 00:05:10,889 --> 00:05:15,360 look up the cost for nine table rooms where a mighty his number two 82 00:05:15,360 --> 00:05:18,470 so that's the hook up funk is one other thing we can't do 83 00:05:18,470 --> 00:05:22,360 because at the moment is returning a number not like it to return 84 00:05:22,360 --> 00:05:26,538 like a currency we can actually convert this 85 00:05:26,538 --> 00:05:30,120 to currency by happen in the SEC 86 00:05:30,120 --> 00:05:33,769 you are market and that means convert currency 87 00:05:33,769 --> 00:05:38,310 anything we've been CC you are practice will be converted to a currency 88 00:05:38,310 --> 00:05:41,930 and we end up with that okay we'll save this will call this 89 00:05:41,930 --> 00:05:47,220 I am query and I'm 90 00:05:47,220 --> 00:05:51,150 booking the to whose X 91 00:05:51,149 --> 00:05:55,129 then the press OK and I we got 92 00:05:55,129 --> 00:05:56,978 Thank You fortunate enough to see you next video