• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 558
  • Last Modified:

Access 2003 not updating a specific field based on dlookup until field is clicked on

I have an Access 2003 form, for simplicity sake lets say I have fields Name, address, city, state, zip and comments. I have an after update event in the name field that does a dlookup to my contacts table and based on the name entered, it automatically populates the address, city, state, zip with corresponding data. That works great, however, in the contacts table I also have a comments field, which this dlookup should also populate once the name is entered, but the comments field on the form doesn't auto-populate until I actually click in the field, then as soon as I click in the field, the correct dlookup data magically appears. The only diff between these few fields is that the name, address, cit, state, zip are text fields, the comments field is memo. Any ideas???
thx experts...Bob
0
bobrossi56
Asked:
bobrossi56
  • 4
  • 3
3 Solutions
 
tbsgadiCommented:
Hi bob,
In the afterupdate event add

me.comments.requery
me.comments repaint


Good Luck!

Gary
0
 
tbsgadiCommented:
bobrossi56,

You might get away with only one of the above statements.
Gary
0
 
bobrossi56Author Commented:
OK, I'll give this a try tonight and see what happens.
thx
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
bobrossi56Author Commented:
no go Gary, both lines of code, together or separately give me an error message:

Compile Error, unexpected function or variable.

-Bob
0
 
tbsgadiCommented:
Instead of "Comments" substitute the name of the text box
0
 
bobrossi56Author Commented:
I did that Gary on my first attempt. However, after poking around I tried .refresh instead of .repaint and it worked.
0
 
tbsgadiCommented:
Great...Glad to help!
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now