vba - " #Name? " error in access using DLookup -


enter image description here

what trying have value("element" primary key) elements table inserted time textbox based on result previous combox.

is write snytax achieve ??

=dlookup("[time]","[elements]","[element]=" & [forms]![1 cut wire , cable only]![element]) 

i suspect there mismatch between name of combo box control , name use in dlookup. try changing combo box control's name cbxelement , using

=dlookup("[time]","[elements]","[element]=""" & [cbxelement] & """") 

for control source of text box. note idea use prefix "cbx" combo boxes, "txt" text boxes, etc., because

  1. it makes them easier find in intellisense list, and

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


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -