Quick background is that I've used Access for a long time, but never attempted my own database. Therefore despite my best attempts at research and learning, there's probably a good chance i'm doing something fundamental wrong.
I'm trying to make a fairly simple RMA/Return goods database.
I have a table called PartNumbers with 4 columns
1. OurCompanyPartNumber (this is the key, it is a unique number)
2. CustomerPartNumber (affiliated 1:1 with Our part number)
3. Customer (the customer name)
4. Description (short description of the part)
I have a table called RMA data that is storing all my fields
I have a form called RMA entry
I have a combo box in the form called OurCompanyPartNumber, where the user would select the part number from the drop down. I have all columns showing, so the user can see the other information for reference.
I understand the combo box can only ultimately display one column after selection. I'd like to use text boxes to display CustomerPartNumber, Customer, and Description based on the selection in the combo box. I'd also like to save those 3 fields to the RMA data table.
Originally I used the DLookUp function in the Control Source of the 3 fields I want to auto-populate. It did work, but with 2 issues:
1- it obviously isn't saving to the table since the DLookUp is the control source
2-when i close the database and re-open it, the DLookUp returns the #Name? error
I saw a suggestion elsewhere to make the DLookUp expresson the Default Value, then make the control source where in the table I want it saved, but that didn't work. Am I way off here ? Below is the DLookUp expression i have . Also if it matters all the "numbers" are short text fields since they often contain letters.
=DLookUp("Customer","PartNumbers","[OurCompanyPartNumber] = '" & [Forms]![RMA entry]![OurCompanyPartNumber] & "'")