field based on combo

Richio

Registered User.
Local time
Today, 06:04
Joined
May 31, 2002
Messages
75
I have a report prepared from a wizard from a form (and amended)

The form (purchase order) has a combo box "ContractNo" picking up info from a SQL query (is this the right terminology)

I have another field on the form "Customer Name" linked to the combo - [ContractNo].[Column](1). this works fine to pick up the customer name automatically when the contract No is entered

My problem is that I need the report to display the customer name as shown on the form but cannot work out the code to enter

I am sure it is simple and will keep trying but any help would be appreciated
 
If your report is populated by a query, simply add the customer name field to the query and then add a textbox control to the report with the controlsource set to this field. Hope this is clear.
 
Still confused

If I go into the query for the report - it show the tables which I am using - I have added the Customer Name field from the purchase order table to the query

I then add this field to the report.

But it does not show any data when running the report - just blank

should I be doing something else -

thanks
 
the penny's dropped

Got it

needed to put another table in the query - things always seem to get easier when you have shared it with someone
 
Is the whole of the report blank or just the customer name field? If it is the whole report either nothing meets the criteria or your table joins are restricting data returned (I know not nearly enough about the types of joins to advise you here!)

(You should not really have the customer name in the purchase order table, but a foreign key, linked to the customer ID in the customer table. This is most likely not normalised data structure which can cause problems)

Glad you sorted it- sometimes the simple solutions are the hardest to spot!. I would look at the data structure though.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom