1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Access 2003 Forms

Discussion in 'Business Applications' started by am1st1, Sep 3, 2008.

Thread Status:
Not open for further replies.
  1. am1st1

    am1st1 Thread Starter

    Joined:
    Sep 3, 2008
    Messages:
    2
    I need to require that certain fields in a form be populated before a user can move on to the next record in that form.

    I included the following formula in the BeforeUpdate property for the form:
    =IIf(IsNull([Combo40]),MsgBox("Please select a value for SAP Adjustment required"))

    I've tested this formula and it works. The problem I have is when I click OK on the message box the form advances to the next record. I would like to keep the same record visible that prompted the message.

    Can anyone advise how I do that? Is there something wrong with my formula or do I need to do something else?

    Thanks!
     
  2. paulrw

    paulrw

    Joined:
    Jun 9, 2008
    Messages:
    30
    How are you inserting the data? With a button click, or moving off the last field? If your using a button, I would use the Click event. Test each field's text box/combo box/etc to see if they contain data AND the proper type of data (IE you expect Alpha characters in a test box and someone tries to enter numbers). Once all your conditions are met, then and only then do you add the data to your table. Otherwise, move the focus back to the control that needs data.

    IF your inserting data by moving off the last field, try using the before insert event Do your checking here. You might also check out the On Dirty event (either use the on-line help or do a google search).
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/746541

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice