[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 491
  • Last Modified:

DLookup in the Control Source Property of a Form Text Box

This is what I have in the Control Source

=DLookUp([Optic Description],[Optics],[Optics]!OpticID=[Top Optics])

but it gives me: #Name?


I am trying to look up a description from the Optics table where The OptiicID is the same as the current displayed record on the form.

Thanks!
0
galneweinhaw
Asked:
galneweinhaw
  • 3
  • 2
2 Solutions
 
jmantha709Commented:
Try :

=DLookUp("[Optic Description]";"[Optics]";"[Optics] = " & Form![Top Optics])
0
 
MourdekaiCommented:
Try this:

=DLookUp("[Optic Description]","[Optics]","[OpticID] = " & Me.[Top Optics])
0
 
jmantha709Commented:
Sorry, mistake, here's to good one :

=DLookUp("[Optic Description]";"[Optics]";"[OpticID] = " & Form![Top Optics])
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
jmantha709Commented:
or :

=DLookUp("[Optic Description]","[Optics]","[OpticID] = " & Form![Top Optics])
0
 
harfangCommented:
Try:

=DLookUp("[Optic Description]", "Optics", "OpticID=" & [Top Optics])

(provided [Top Optics] is a control that displays a valid OpticID number)

Good Luck!
0
 
harfangCommented:
we have fast typers here :)
BTW: the semi-colon is valid in a french setup, for example (see the Windows "list separator"), and the "Me." syntax does not work in a control source...
Cheers!
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now