hi,
this is driving me nuts
I have looked everywhere for a solution and it should work but dosn't !!
I have a form used to book holidays into a database,
The driveres name is supplied from a conmo box and then I want the depot filled in automatically from a lookup from a table containing all the driver details - this is important as the depot is used to drive some queries later.
I have used a dlookup but keep getting a syntax error - I know it is something stupid but i just can't see it. Here is the little snippet of code that is causing me the problems:
Private Sub txtName_AfterUpdate()
FullName = txtName.Value
Depot = DLookup("Depot", "Drivers", "FullName1=" & FullName)
txtDepot.Value = Depot
End Sub
any help will be great
this is driving me nuts
I have looked everywhere for a solution and it should work but dosn't !!
I have a form used to book holidays into a database,
The driveres name is supplied from a conmo box and then I want the depot filled in automatically from a lookup from a table containing all the driver details - this is important as the depot is used to drive some queries later.
I have used a dlookup but keep getting a syntax error - I know it is something stupid but i just can't see it. Here is the little snippet of code that is causing me the problems:
Private Sub txtName_AfterUpdate()
FullName = txtName.Value
Depot = DLookup("Depot", "Drivers", "FullName1=" & FullName)
txtDepot.Value = Depot
End Sub
any help will be great