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
Solved

Access Form: simple question

Posted on 2013-06-25
3
384 Views
Last Modified: 2013-06-25
Dear experts -
I think this is simple, but can't get it to work:
There is no space to squeeze in an invoice number field on a form. Instead, when the user tabs out of the invoice amount field, I put in code in the after update event of the field to invoke a popup where the user can enter the invoice number. This works fine.
However, if the user (intuitively) hits shift-enter (to save) after entering the invoice number, it seems to be simultaneously invoking the popup AND the form before update.
Is there some way to only have the popup appear - i.e., if user tries to save record and invoice number isn't entered, the popup is invoked first?
Thanks!
0
Comment
Question by:terpsichore
3 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 39276022
You might be able to use the main forms BeforeUpdate event to check for the invoice.  If the Invoice has not been entered, you could call the popup form, enter the invoice # and enter it into the main form.
0
 
LVL 4

Expert Comment

by:LCCSAM
ID: 39276035
What version of MS Access are you using?
I would consider putting the code for the "popup" in the On Lost Focus or On Exit event and see if that works. (On Change may work for you as well)
0
 

Author Closing Comment

by:terpsichore
ID: 39276851
simple solution that gets the job done -
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

789 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