Results 1 to 4 of 4
  1. #1
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383

    Riddle me this! Cant make field not be null


    I have a combo on my form that has to have a value in it. The field is Bank. I have this code on the Lost Focus and OnExit Events and still it does not make it work. Nothing happens, no message, no set focus???

    If IsNull([Bank]) Then
    MsgBox "You did not select a bank account,Select or else Cancel"
    Me.Bank.SetFocus
    End If

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Try:
    Code:
    If Nz(me.Bank,0) = 0 Then
    MsgBox "You did not select a bank account,Select or else Cancel"
    Me.Bank.SetFocus
    End If
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    Nope, it did not like that either. ??? Hmm! It is a text field, and not a numeric value though, but still?

  4. #4
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    MY Apologies, I had left the field with a control source and it should not have had one.

    Thanks,

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 06-19-2012, 10:46 AM
  2. If/Then Null based on Null Value of Another Field
    By vbpeterson in forum Queries
    Replies: 11
    Last Post: 06-05-2012, 05:00 PM
  3. Query Help - Show field if another field is null
    By lukekonrad in forum Access
    Replies: 1
    Last Post: 03-05-2012, 04:02 PM
  4. make query fields not display if null data
    By rivereridanus in forum Queries
    Replies: 1
    Last Post: 07-05-2011, 08:19 AM
  5. Make new field based on previous field's answer
    By VictoriaAlbert in forum Access
    Replies: 1
    Last Post: 04-11-2011, 09:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums