I have a form called "Input Information" that writes to a table called "Data". I have a field on that form called "Unit Number". I have another text field on the form called "Unit Rate".
I have another table called "Vehicle List". 2 of the fields on this table are "Vehicle Id" and "Cost Per Mile"
I am trying to do a lookup against the Unit Number which is the same as Vehicle ID to get the Unit Rate which is the same as Cost Per Mile. I put the following code in the change event on the form field called Unit Number but it isn't working. Am I barking up the wrong tree?
I have another table called "Vehicle List". 2 of the fields on this table are "Vehicle Id" and "Cost Per Mile"
I am trying to do a lookup against the Unit Number which is the same as Vehicle ID to get the Unit Rate which is the same as Cost Per Mile. I put the following code in the change event on the form field called Unit Number but it isn't working. Am I barking up the wrong tree?
Code:
Me.Unit_Rate.Value = DLookup("[Total Cost Per Mile]", "[Vehicle List]", "[Vehicle Id]=" & Me!Unit_Number)