AfterUpdate Event & DLookup Function in Microsoft Access - How to Look Up Values from Table to a Form
In this Microsoft Access tutorial, I will show you how to look up and auto populate fields in a form using the DLookup function and the AfterUpdate event in VBA (Visual Basic). Don't worry if you've never done any programming before. I'll take it step by step.
Chris (Gold Member) asks, "I assign zone numbers to customers based on the state the customer is in. However, this isn’t a rule. There may be exceptions, such as if a sales rep brings in a new customer from out of his zone. Is there a way to automatically fill in the default zone for the customer when I enter his state, but still be able to change it?"
AfterUpdate Events: https://599cd.com/afterupdate
DLookup Function: https://599cd.com/dlookup
String Concatenation: https://599cd.com/concatenation
Excel VLOOKUP: https://599cd.com/vlookup
Excel XLOOKUP: https://599cd.com/xxlookup
BONUS FOR CHANNEL MEMBERS:
Silver Members and up get access to an EXTENDED CUT of this video which covers additional examples. That video will show you how how to prompt the user for the Zone number if the State isn't found in the table. We will learn how to use the InputBox, NZ, CInt, and IsNumber functions, and learn about type casting.
MEMBERS ONLY VIDEO:
BECOME A MEMBER:
InputBox Function: https://599cd.com/inputbox
NZ Function: https://599cd.com/nz
Type Casting: https://599cd.com/type+conversion
CInt Function: https://599cd.com/cint
IsNumeric Function: https://599cd.com/isnumeric
SQL Seminar: https://599cd.com/sql
FREE Customer Template Database: https://599cd.com/XCDT
FREE Access Level 1: https://599cd.com/Free101
$1 Access Level 2: https://599cd.com/1Dollar
Your Questions Answered: https://599cd.com/TechHelp
Learning Connection 50% OFF: https://599cd.com/Connection
Richard's Blog: https://599cd.com/blog
Access Forum: https://599cd.com/AccessForum
Email Me: email@example.com
Post your questions below!