I am having trouble getting my dlooup to return any value. I have 5 that I am doing in my vba code. The first two work great but the other three don't return any value or errors.
I did check to see if school data type matches. Which it does. The only real difference between the two and the bottom three is the table that its is lookup up the values from. I have triple checked the spelling of all field and the table name. Thank you for the help.
Code:
Private Sub Report_Load() Text72 = DLookup("[address]", "Customer Database", "school='" & Reports![Create Route Invoice]![School] & "'") Text75 = DLookup("[city State, Zip Code]", "Customer Database", "school='" & Reports![Create Route Invoice]![School] & "'") Text93 = DLookup("[PRP]", "Route Pricing per School", "school='" & Reports![Create Route Invoice]![School] & "'") [Excess time per Hour] = DLookup("[ETPH]", "Route Pricing per School", "School='" & Reports![Create Route Invoice]![School] & "'") [Excess Mileage Rate per Mile] = DLookup("[EMRPM]", "Route Pricing per School", "School='" & Reports![Create Route Invoice]![School] & "'") '[number of trips] End Sub
Comment