Forum Discussion
Printing Customer Information from a Customer ID
It is more common that a customer is chosen from a dropdown on a form: it has 2 columns: an invisible CustomerID, and a visible CustomerName column. If you download the Northwind Starter Edition Template (File > New), you will see an example of that on the OrderDetails form.
I have the following fields in my table:
Feasibility ID Customer ID License # Inspector Date Time Status
Thank you,
CS
- Tom_van_StiphoutDec 28, 2023Steel Contributor
> Feasibility ID Customer ID License # Inspector Date Time Status
I would HIGHLY recommend you get rid of spaces and other funny characters, as well as Reserved Words.
Also a few more lookup tables may be in order, like tblInspectors and tblStatus.
FeasibilityID, CustomerID, LicenseNo, InspectorID, VisitDateTime, StatusID- CShewearDec 28, 2023Copper ContributorI do have look up tables for each of the items listed.
Thanks,
CS- Tom_van_StiphoutDec 28, 2023Steel ContributorCreate a report query, joining the 3 tables. Then base your report on that query.
- Tom_van_StiphoutDec 28, 2023Steel ContributorGood for you following relational database principles, where everything has 1 place only.
If we are on a Feasibility form, and selected a Customer from the dropdown, we have several options on getting additional customer info to display on the screen. The simplest may be to have the combobox (name: cboCustomer) have more than 2 columns. Example RowSource:
select CustomerID, CustomerName, City, CreditLevel from tblCustomers order by CustomerName
The columnWidths for the combobox are set to 0;1;0;0. Of course ColumnCount is now 4.
Add a textbox to frmFeasibility and set its ControlSource to:
=cboCustomer.Column(2)
and another one for Column(3). This will display the City and CreditLevel.- CShewearDec 28, 2023Copper Contributor
Tom_van_Stiphout Thank you for that information. What I am trying to do is to have a printout that would display all the customer information and all the facility information for the inspectors and other staff. I currently have 3 auto populate forms in my database.
1 - Customers
2 - Facilities
3 - Feasibilities
All of these three forms feed back into their individual tables. I need one printout that shows all the information for the staff.
I would greatly appreciate any suggestions.
Thank you for your time.
CS
- CShewearDec 28, 2023Copper ContributorIt is a dropdown.