\r\n\r\n\r\nHello! I\'m fairly rudimentary at the programming could someone please help me with this! \r\nI have two files "cars.txt" and "customers.txt" And upon pressing find car a loop will try to match a registration in "cars.txt" If a match is found then I want to display the information from the two files in labels. \r\nI have had trouble combining the two files and the code doesnt work possibley due to bad ordering? Could someone please follow me through this. \r\n \r\nPrivate Sub regfind() \r\n\'this is where i search thecustomers that came before. If the registration is not found then show a message box saying "add new customer" then set target to new registration. If the registration was found then display all details in a label. Also validate \r\n \r\n foundcar = False \r\n fn = FreeFile() \r\n Open "N:\\my pictures/cars.txt" For Input As #1 \r\n Open "N:\\my pictures/customers.txt" For Input As #fn \r\n Do While Not EOF(1) And Not foundcar \r\n Input #1, registration, cartype, company, typecode, lsdate \r\n Do While Not EOF(2) \r\n Input #2, custname, address, town, postcode, telephone \r\n If txtcustomercarreg = registration Then \r\n foundcar = True \r\n lbltyretype = "Tyre-type Code: " & typecode \r\n lblcartype = "Car Manufacturer: " & cartype \r\n lblcompname = "Customer Name: " & company \r\n lblregs = "for registration " & registration \r\n lblls = "LastService date: " & lsdate \r\n End If \r\n Loop \r\n If company = custname Then \r\n \r\n lbladdress = "Address: " & address & ", " & town \r\n lblpostcode = postcode \r\n lbltelephone = "Telephone: " & telephone \r\n End If \r\n Loop \r\n Close #fn \r\n \r\n If Not foundcar Then \r\n MsgBox "REGISTRATION NOT FOUND" & Chr$(10) & "Please check or add new car to the database", vbExclamation + vbOK, "Registration not found" \r\n \r\n \r\n End If \r\n \r\n\r\n | \r\n
\r\n