Display Choice of ComboBox in Text field!?

maildodge

New member
Local time
Today, 12:48
Joined
Aug 22, 2004
Messages
5
I have a table with Customer Code and Customer Name. And a second table with details of Order.

Basically I need to be able to input/choose the customer code in the order form and for the customer name to be automatically filled.

Im sure its very simple, for some reason I cant get my head round it. Im going mad trying to do it and searching for the solution. :eek:

I have attached the database, any help would be great.

(Im sure there will be loads wrong with the database you guys will also spot)

Many thanks.
 

Attachments

first youd need to create a relationship between your tables.

then create a query that has all the informaation from both tables. Like the code you would select from a combo box.

ive created a query naed query 1 and a form named modified order so this works.

let me know if i hae helped/ :rolleyes:
 

Attachments

mail,

-----------------

The RowSource for your combo should be:

SELECT Cust.Code, Cust.Name FROM Cust;

Then in the AfterUpdate event of the combo:

Me.Customer_Name = UCase(Me.Combo26.Column(1))

-----------------

Now for the "loads wrong" comments:

Don't use Name as a field name, (it's reserved).

Don't use Spaces in your field names (tougher to work with).

Don't need to put customer code & customer name in your Order table,
just put the code and in your query use a join (experiment with queries).

Don't base your Order form on the entire Order table (hard to use later).
Use the Search Facility and look for "Search".

hth,
Wayne
 
Thanks :D

Cheers for the quick reply Popeye and the modified file.

WayneRyan, thats exactly what I needed.

I said it would probably be simple.

Thank you so much. It has taken me so long trying to figure it out, I actually had something similar to that earlier today but just a bit missing, that why it didnt work.

Also thanks for the other comments, I know its not a perfect one, mainly because I started it as a test then one thing lead to another.

Again many thank.
 

Users who are viewing this thread

Back
Top Bottom