Results 1 to 6 of 6
  1. #1
    willfrank is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    32

    # Error displayed in Text Field

    How do I keep text field clear (no #Error display) until dlookup is activated from combo box selection: Below is my current dlookup code:

    =DLookUp("PhoneNumber","Rooms","RoomID=" & [RoomID])

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    keep txtbox unbound until you pick the roomID
    then just fill in the phone in the afterupdate of the combo.
    (and bind it too if needed)

  3. #3
    willfrank is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    32
    Thanks for your reply, but this will not work, as the dlookup text field is based on a cascading combo box with a query..

    Quote Originally Posted by ranman256 View Post
    keep txtbox unbound until you pick the roomID
    then just fill in the phone in the afterupdate of the combo.
    (and bind it too if needed)

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2013
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,537
    Perhaps:
    =DLookUp("PhoneNumber","Rooms","RoomID=" & Nz([RoomID],0))
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    then instead of Dlookup, put the phone in a column in the combo box when user selects that item.

  6. #6
    willfrank is offline Advanced Beginner
    Windows 7 32bit Access 2013 32bit
    Join Date
    Apr 2016
    Posts
    32
    thanks for your suggestion:

    I have another resolve that I just received.

    Quote Originally Posted by ranman256 View Post
    then instead of Dlookup, put the phone in a column in the combo box when user selects that item.

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

Similar Threads

  1. Error displayed on the navigation form
    By stephenchan433 in forum Forms
    Replies: 1
    Last Post: 11-14-2015, 06:44 PM
  2. Replies: 1
    Last Post: 08-09-2014, 04:01 PM
  3. Replies: 3
    Last Post: 07-16-2013, 03:22 PM
  4. Replies: 1
    Last Post: 07-12-2012, 12:09 PM
  5. Field displayed as a record
    By DavidMack in forum Queries
    Replies: 6
    Last Post: 07-05-2012, 02:13 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