Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Set Focus on a particular field in a form

Posted on 2004-10-25
Medium Priority
Last Modified: 2006-11-17

I have a field in a form that after update it will chek the UM on whatever they enter on the item field and display it in the UM field but when they enter a invalid item it will pop a message "not valid item" and the next step is ITEM.Setfocus to the item field so they can enter the right one but with that it jumps to the next tab field. it seems the SetFocus doenst work.

Any suggestions on how to handle this is appreciated.

Question by:tvae
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 18

Accepted Solution

Data-Man earned 200 total points
ID: 12401242
put the check in the before update...in the afterupdate, the data has already been changed.

if the data isn't valid, set the cancel = true...the focus will stay on the field.  

Use the before update for the field you wish to check.


Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question