Results 1 to 3 of 3
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    Drop downs error on clear


    If my staff clear the show combo box (press delete on what they have selected)

    I get this

    Click image for larger version. 

Name:	Capture.JPG 
Views:	10 
Size:	26.2 KB 
ID:	14230

    I am assuming because they have cleared it and it is null it can't find it

    original vba below

    ShowPricePerStudent = Nz(DLookup("ShowCostTotal", "tblJncShowYear", "ShowsID=" & Me.ShowsID & " AND ShowYearID=" & Me.BookingYear), " ")
    BookingTheatreSeats = Nz(DLookup("ShowTheatreSeats", "tblJncShowYear", "ShowsID=" & Me.ShowsID & " AND ShowYearID=" & Me.BookingYear), " ")

    Any suggestions?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Sure; test both combos and only run that code if both are populated.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by pbaldy View Post
    Sure; test both combos and only run that code if both are populated.
    ok I will give that a go, thanks pbaldy

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

Similar Threads

  1. Replies: 2
    Last Post: 09-10-2013, 07:44 AM
  2. database design: conditional drop-downs?
    By sebeckett in forum Access
    Replies: 5
    Last Post: 09-05-2011, 12:46 PM
  3. VBA Error Handling Clear
    By josephff in forum Programming
    Replies: 19
    Last Post: 08-30-2011, 12:12 PM
  4. Collecting data via email with drop downs
    By tlyons in forum Access
    Replies: 2
    Last Post: 01-19-2011, 10:34 AM
  5. Drop downs and serching in subforms
    By joelwebster in forum Forms
    Replies: 0
    Last Post: 12-13-2009, 03:38 PM

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