A family of Microsoft relational database management systems designed for ease of use.
Thanks for posting your question in the Microsoft Q&A forum.
If Me.txtname is a text field, your code should be in this format:
Me.txtpost = DLookup("Designation", "tblStaff", "EmployeeName='" & Me.txtname & "'")
I hope it fix your request