Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    dhicks is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    36
    My code and the error result:



    If DCount("*", "qryMsgBoxCriteria", "Item=" & Me!Item & "And IsNull(Actual_Pickup_Date)") ThenClick image for larger version. 

Name:	3075.PNG 
Views:	8 
Size:	6.7 KB 
ID:	29444
    MsgBox "There is an active Reservation on this item, check for potential Date conflicts."
    End If

    Added Note: I think I actually see the problem. It's not the code -- at least I don't think it is. I may be wrong on this. While my subform is displaying the records just fine, it also has a new record started with just the Item field populated, so I wonder if it is affecting the query. Gotta figure out how to not have the subform default like that.
    Last edited by dhicks; 07-14-2017 at 01:42 PM. Reason: Update

  2. #17
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Make sure there is a space before And

    Code:
    " And IsNull(Actual_Pickup_Date)") Then
    and I think you'll need some quotes

    If DCount("*", "qryMsgBoxCriteria", "Item='" & Me!Item & "' And IsNull(Actual_Pickup_Date)") Then

  3. #18
    dhicks is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    36
    So I was WAY off on my theory, the extra quotes did it (I already had the space before "AND"). It works great now. Thanks to everyone who helped.....you made my weekend

  4. #19
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,474
    Great Job!!!

  5. #20
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 04-07-2017, 08:55 AM
  2. Replies: 2
    Last Post: 08-28-2014, 11:47 AM
  3. Replies: 3
    Last Post: 09-12-2013, 02:18 PM
  4. Display custom error if field is null or zero
    By steve87bg in forum Access
    Replies: 1
    Last Post: 01-14-2013, 02:33 AM
  5. Null field message
    By jpkeller55 in forum Access
    Replies: 3
    Last Post: 09-03-2010, 10:45 AM

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