I am attempting to populate text box Contact_Name. The contact name should be selected from the choices made in two combo boxes, cboBranch_Name and cboBranch_City.There are many different cities in a branch_name, but each city has one branch contact. All these fields are in one table, Branch.
I have been trying to populate the text box using a Dlookup. Is their another way to do it? Is this even a good way to? At the moment the text field is displaying a wildcard error. I have entered the Dlookup script in the rowsource section of the text box.The Dlookup script is as follows.
=Dlookup("[Branch_Contact]","Branch","[Branch_City]=" & [Forms]![MainForm]![cboBranch_City] & "And [Branch_Name]=" & Forms!MainForm!cboBranch_Name)
Any help with this would be great, as this has been driving me around the bend.

I have been trying to populate the text box using a Dlookup. Is their another way to do it? Is this even a good way to? At the moment the text field is displaying a wildcard error. I have entered the Dlookup script in the rowsource section of the text box.The Dlookup script is as follows.
=Dlookup("[Branch_Contact]","Branch","[Branch_City]=" & [Forms]![MainForm]![cboBranch_City] & "And [Branch_Name]=" & Forms!MainForm!cboBranch_Name)
Any help with this would be great, as this has been driving me around the bend.
