" #Name? " error in access using DLookup

What I am trying to do is to have a value("Element" which is a primary key) from my Elements table be inserted into the time textbox based on the result from the previous combox.

Is this the write snytax to achieve this ??

=DLookUp("[Time]","[Elements]","[Element]=" & [Forms]![1 Cut Wire and Cable Only]![Element])

Answers


I suspect that there is a mismatch between the name of your combo box control and name you use in your DLookup. Try changing the combo box control's Name to cbxElement and then using

=DLookUp("[Time]","[Elements]","[Element]=""" & [cbxElement] & """")

for the Control Source of the text box. Note that it is usually a good idea to use a prefix like "cbx" for combo boxes, "txt" for text boxes, etc., because

  1. it makes them easier to find in an IntelliSense list, and

  2. it avoids potential conflicts when the name of a control is identical to the name of a field in the underlying record source.


Need Your Help

Databases: column encoding, when is it important?

mysql database character-encoding

We are importing data from .sql script containing UTF-8 encoded data to MySQL database:

Xcode 5 not printing exception detail

ios objective-c xcode xcode5

I have a project built for iOS 7 and it worked fine so far, but after a Git merge, some settings or something became corrupted and exceptions are not outputted to console anymore. So the "Terminati...