Avatar of SteveL13
SteveL13Flag for United States of America

asked on 

Populate form field with a DLookup

I should know how to do this but I'm drawing a blank.  I have a field on a form.  Its record source is a field in the bound table.  I want to populate it and have it drop in the field in the table with a DLookup like:

=DLookUp("[dbUserID]","LOCALtblCurrentUser")

but I can't figure out where to put that code.  I've tried the onopen event of the form and also the beforeupdate event of the form but it doesn't work.

Any help much appreciated.
Microsoft Access

Avatar of undefined
Last Comment
SteveL13
ASKER CERTIFIED SOLUTION
Avatar of PatHartman
PatHartman
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of SteveL13
SteveL13
Flag of United States of America image

ASKER

Perfect.  Thanks.
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo