• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 560
  • 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
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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