Results 1 to 10 of 10
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Make field required half way through data entry (Access XP)

    Hi all,

    I have a query from a client who works with application info! They enter data about their customers into a DB, then send an application to the customer. Once the application comes back, they complete the record based on details in the application. Some of these details must be entered into the fields (ie. Required data). The problem is??...how do we make these fields required without it screaming to the data capturer when they add the initial data.

    Tx
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Make field required half way through data entry (Access XP)

    You could check whether fields are filled in in the Before Update event of the form, and only shout if the record is not new:

    Private Sub Form_BeforeUpdate(Cancel As Integer)
    If Me.NewRecord Then
    ' Don't check for new records
    Exit Sub
    End If

    If IsNull(Me.txtSomething) Then
    MsgBox "You stupid fool! Enter something!", vbExclamation
    Me.txtSomething.SetFocus
    Cancel = True
    End If

    If ...' etc.

    End Sub

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Make field required half way through data entry (Access XP)

    Tx again!

    As far as I know there are not forms in the DB yet as it is in design still. I'll suggest something that you have provided.

    PS: Could I use the code EXACTLY as you provided...or is there copyright on the message??? <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>
    Regards,
    Rudi

  4. #4
    5 Star Lounger
    Join Date
    Nov 2004
    Location
    Wilmington, North Carolina, USA
    Posts
    1,196
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Make field required half way through data entry (Access XP)

    >>Could I use the code EXACTLY as you provided...or is there copyright on the message

    If Hans had a copyright on all the code he provides, I don't think too many loungers would keep their jobs! <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>
    ____________________________
    Jeremy
    "If you spend more on coffee than on IT security, then you will be hacked. What&#39;s more, you deserve to be hacked." -Richard Clarke

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Make field required half way through data entry (Access XP)

    Well, you might have a problem with the "If ... etc." part, Rudi, copyright or no! <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15> Seriously, though, much of the code provided in this forum is fairly generic and could be recreated almost verbatim by another programmer familiar with the particular technique. A copyright on that kind of code would be pretty useless. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15> In some cases, I post code that I created some time ago, and it will include my name and the creation date. That isn't any kind of copyright information, it's merely a marker so I know that the code is old enough to possibly need tweaking for some versions or at least apologies for its creakiness. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Charlotte

  6. #6
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Make field required half way through data entry (Access XP)

    Tx for the info!

    I refered to the copyright as a "joke", as I was amused at the message in Hans code...>>> MsgBox "You stupid fool! Enter something!", vbExclamation. I can't recall Hans EVER taking advantage of (what I call) Programmers perogative!! It really took me by surprise as Hans is always sooo professional in his approach to code!!!!

    See ya
    Regards,
    Rudi

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Make field required half way through data entry (Access XP)

    perogative? <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  8. #8
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Make field required half way through data entry (Access XP)

    Sorry - Prerogative <img src=/S/blush.gif border=0 alt=blush width=15 height=15>
    Regards,
    Rudi

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Make field required half way through data entry (Access XP)

    That is an existing word, at least, but it doesn't make sense. Didn't you mean pejorative?

  10. #10
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Make field required half way through data entry (Access XP)

    Not at all....I'll never call you critical or say that you sneer!!!

    I just meant that its the choice of a programmer to display these sarcastic "joking" messages!

    Hope thats clear...else you will need to move this post to scuttle <img src=/S/moon.gif border=0 alt=moon width=15 height=15> to continue our pedantry!! <img src=/S/wink.gif border=0 alt=wink width=15 height=15>
    Regards,
    Rudi

Posting Permissions

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