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

Simple for the smart ones... Requering a form once I hit enter

I have a simple form that updates a table.  I have a look up to another table inside the form that looks up city and state.  So when my users type in the street address they tab to city pick from the drop down list and then that will fill in the state.  Works great the first time but if they change the city it does not requery  the state.  Even if I hit enter on the city field.  

I have tried on the form on got focus a me.refresh and me.requery and both times it errors out that me cannot find the object me.  

It works if I do a Shift + F9.  I have tired to put the me.requery on the event also in the field..

Help
0
cres1121
Asked:
cres1121
  • 3
  • 3
1 Solution
 
PatHartmanCommented:
In the afterUpdate event of the City, set the state to null and requery the combo

Me.cboState = Null
Me.cboState.Requery
0
 
cres1121Author Commented:
Okay you knew this was coming... Compile error:  method or data member not found.  Do I have to define it somewhere?
0
 
PatHartmanCommented:
You did change the code to use your own control names, right?
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.

 
cres1121Author Commented:
Yes.. I did
0
 
cres1121Author Commented:
figured it out.. I had not been referring to the right column
0
 
PatHartmanCommented:
Glad you got it worked out.  Please don't forget to close the question.
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: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

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