locked
DLookup bug > doesn't refresh after retrieves data > solution RRS feed

  • Question

  • Team:

    I found this while attempting to use DLookup for the first time.

    I got DLookup working meaning no #Name? error.
    e.g.
    tried string assembly in text box, no go
    query worked perfectly every time

    only issue ...
    blank text box ...


    Since I always test, I accidentally moved the mouse over text box.
    TA-DAH!
    It showed up.

    major stupid ...

    Why should users have to perform more than one click to get what they want?

    I ended up using Me.Refresh & Me.text box.SetFocus to have data show up with one click.

    Thursday, September 15, 2016 5:11 PM

Answers

  • Good Afternoon Daniel:

    looked at examples on WWW to no avail per "expression" in text box ...

    query worked fine ...

    field name & control different > estimate vs. txtEstimate

    was just passing on tip per Refresh/Setfocus since not posted @ WWW ...

    Gratzie.

    • Marked as answer by TheManiac Thursday, September 15, 2016 6:45 PM
    Thursday, September 15, 2016 6:45 PM

All replies

  • What version of Access are you using?
    Can you post a sample version of the db for closer review.

    What does "tried string assembly in text box, no go" mean?  You'd have to show us an example.

    Typically, when you see #Name? it is because your field name and control names are the same.  You need to rename the control something other than the field name and the issue goes away.


    -- Daniel Pineault, 2010-2015 Microsoft MVP Professional Support: http://www.cardaconsultants.com MS Access Tips and Code Samples: http://www.devhut.net


    Thursday, September 15, 2016 5:17 PM
  • Good Afternoon Daniel:

    looked at examples on WWW to no avail per "expression" in text box ...

    query worked fine ...

    field name & control different > estimate vs. txtEstimate

    was just passing on tip per Refresh/Setfocus since not posted @ WWW ...

    Gratzie.

    • Marked as answer by TheManiac Thursday, September 15, 2016 6:45 PM
    Thursday, September 15, 2016 6:45 PM