Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Brugge, Belgium
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What makes sense (ms Access 2007)

    Suppose I have two textboxes in a form e.g. txtArtcode and txtQty which are respectively bound to the field Artcode of type text and to the field QTY of type double.
    To be sure that the user enter a value in each of these textboxes and to make sure that these values are appropriate what can i do for best?

    For what about the txtbox txtArtcode, does it makes sense to test the entered value during the before update of the textbox as as follows:
    if txtArtcode | "" = "" then (testing for empty value)
    or if IsNull(txtArtcode) (testing for null )

    Or can we eliminate both tests by making this field in the table as required

    The same question for what about the textbox Qty of type Double

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: What makes sense (ms Access 2007)

    I put my checks for valid entries, such as if the entry value must be >0 etc., in the control's BeforeUpdate event.

    However, I don't worry about whether or not it is Null there. For controls for which I want to require an entry, I put all checking for Null values for controls in my Form's Before Update Event. This way, this gets checked even if user skipped over these controls.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Brugge, Belgium
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What makes sense (ms Access 2007)

    Thank you for your advice

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •