Results 1 to 4 of 4
  1. #1
    dniezby is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2013
    Posts
    183

    Hiding an error

    I have a stand alone Textbox on a form that is really only there to aid the Application's user.



    I use a DLookup to populate the field. It's displayed in a Datagrid.

    It's a simple look up, =DLookUp("fullname","members","ID_memtbl=" & [member])

    So, when user chooses the Member's ID it displays their full name. It works, but what my issue with it is, the next record that has NOT yet been started, displays and #error in the DLookup box of the NEXT record. It's not a problem but it is distracting and ugly to the user.

    IS there a way to supress this error display?

  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
    Would this be an appropriate alternative?

    http://www.baldyweb.com/Autofill.htm

    it would be more efficient and not have that problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    dniezby is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2013
    Posts
    183
    This method was actually very efficient for listing information on the form that I don't need to save. Since the data is already recorded in another table, I would NOT be recording redundant data.

    I actually will use it more often now. Thanks for pointing me in this direction.

    For those that might be looking this up, here is the solution that came up.

    I already have a combobox on my datagrid with three field results in it.

    EG:
    Code:
    'Populate your combo box with data.
    myComboBox = SELECT ID_custtable, cust_number, cust_fullname from customers
    Now, if you don't want to store the data in the form, and only need it to be shown for ease of use. For example, if you enter the customer number you will probably want the customer's full name to display so you can show your user that the correct member has been selected.

    Create a textbox, we'll name it creatively - fullname
    Then in the ControlSource box enter
    Code:
    =ComboBoxName.Column(X)
    Use the name of the ComboBox you're looking up the information from.
    The X is the Column of data you want to display.
    Using the current example, if I used Column(2) it will display the fullname. When counting the columns, remember that the columns start at ZERO not one. So it's 0,1,2

    Hope this helps someone else.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Glad it helped you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Hiding Images
    By Mclaren in forum Access
    Replies: 9
    Last Post: 06-30-2011, 11:37 AM
  2. Hiding toolbar?
    By BAX5127 in forum Access
    Replies: 2
    Last Post: 04-06-2011, 10:58 AM
  3. Hiding The Ribbon
    By rashidhussain in forum Forms
    Replies: 1
    Last Post: 03-01-2011, 03:36 AM
  4. Hiding Zeros
    By Alex Motilal in forum Reports
    Replies: 2
    Last Post: 08-06-2010, 08:28 AM
  5. hiding forms
    By Halocarbon in forum Access
    Replies: 1
    Last Post: 12-09-2005, 09:51 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