Because she was on a weight-loss programme, recorded weights varied a lot. In the database used by another person, weighings were taken place every two to three weeks. The table above shows that weighing was made on reasonably frequent occasions and weight variations were not large. In using this database the person isn’t required to weigh himself every day. The database records the food the person has eaten and compares their daily intake of nutritional components - carbohydrates, sugars, fat, protein and so on - with recommendations for a healthy diet based on their body weight. The table of body weights, above, is take from a database I’ve created for monitoring a person’s diet. But there’s an additional requirement, explained in the next section. So what’s needed is a function that’s akin to VLOOKUP. In Microsoft Excel, it’s VLOOKUP function allows you to avoid a null result by instructing the function to return the nearest matching result. In this context Access requires you to supply a date in the mm/dd/yyyy form.)įor a date that does not appear in the table DLookup returns null. (The use of the # character signifies to Access that the is a date and not 03÷01÷2019. For example, to look up a person’s weight on a certain date recorded in this table:Īccess's Dlookup function will return a value from the table, as in this example for March 1st 2019 in which it would return 79.3:ĭlookup("Weight","tblBodyWeight","DateWeight=#") How to create a VBA procedure in Microsoft Access that behaves like Excel's VLOOKUP function but with additional functionality.Ĭonsider needing to look up a value in a list that matches a certain criterion. (e) A Look Up Function for Microsoft ® Access
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |