List Box

cdg

Registered User.
Local time
Today, 21:14
Joined
Apr 6, 2009
Messages
14
Hi
Is it possible to select three column values from a list box

I have a form with a list box (ListBox1) based on a table, (tblAlpha) with three fields used, FieldA, FieldB and FieldC, this was created using a wizard and stores the bound column (FieldA) in (tblBrava) in FieldD of that table.This works fine but I would also like to store the other two field values, FieldB and FieldC that are also highlighted in (ListBox1) and store them in (tblBrava) in fieldE and FieldF.

Hope this makes sense

Cheers Chris
 
but i would urge against storing the same data in different tables. big no no.
 
Chris

If you store the primary key, which is unique, you can always reference all the other values by joining the two tables together.

Please let me know if you need further clarification. I may have over simplified the answer.
 
I agree. If your tables are created properly, you should have a unique ID for each record. You may list as many fields as you like from a record in a listbox, and as long as your listbox is bound to the ID for the record, you can use it to retreive any related data.

You question, as I understand it, seems to point to a non-normalized table structure.

Evan
 
Hi all
Thanks for your replies and sorry for the delay in responding , been on hols for a while. Anyway i know exactly what you are saying and i have tried to achieve what i want using a good table structure but i am struggling to acheive what i want. I have attached a screenshot of my appointments database with the book appointments form open so hopefully you can shed some light on what I am trying to acheive.
My database consists of a customer table with Pkey of CustID and Vehicles Table with FKey of CustID with one to many relationship. Vehicle table is supplied with data from Manufacturer table, Model table and Engine table all with relevent relational fields from the proceeding table, IE: Model table is related to Manufacturer table as Engine table is related to Model table via ID fields. The book appointment Form is based on a Query that selects data from the Customer table and Asset Table and has a Subform based on a vehicles table that is linked to the appointments table via a CustomerID field, therfore when a customer name is selected in the customer name field the subform refreshes with the vehicle or vehicles that a linked to that customer, in some cases, there may be several vehicles details appearing in the subform that are linked to that customer. My original plan was for an operator to be able to double click on a row in the datasheet view for one vehicle's details that the customer wanted to make an appointment for and that vehicles details would be appended to the appointments table, for that particular appointment, and customer, then after a form refresh event they would show up in the three text fields alongside the Aappointment Notes box on the form.
Hope this makes sense

PS i have manually added the data in the fields i want to work in the Picture


Regards Chris
 

Attachments

  • diary.jpg
    diary.jpg
    103.3 KB · Views: 119
Last edited:

Users who are viewing this thread

Back
Top Bottom