Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

Trouble selecting value from DBLookupComboBox


  • Please log in to reply
2 replies to this topic

#1 georgiegal


    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 27 July 2008 - 01:54 AM

Hi guys,

I was hoping somebody could kindly shed some light on a relatively basic function for I am trying to execute in Delphi for a project I am completing for work. I am very new to the world of Delphi so any assistance would be greatly appreciated.

I have connected a MS Access Database to some DBLookupComboBoxes. A one to many relationship exists whereby a user selects a particular material from a dropdown menu, but for each material, there may be more than one colour that the user can select, all of which price may differ.

Currently, if a user selects a particular material, all the colours within the database display, irrespective of material chosen. In addition, depending on the material that is selected, all the colours are highlighted by the pointer for when the user attempts to chose a colour.

I eagerly anticipate any reponse from the professionals!! :)


  • 0

#2 WingedPanther73


    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 28 July 2008 - 08:15 AM

You probably need to have a query that you run when you change the material so the list of colours will be limited to that material.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/

#3 georgiegal


    CC Lurker

  • Just Joined
  • Pip
  • 2 posts

Posted 28 July 2008 - 03:36 PM

Hi WingedPanther,

Thank you so very much for that.

I am not very proficient with queries so I your assistance would be greatly appreciated.

I currently have 2 tables.

1. Raw Materials
Fields: MatSpec, MatGrade, MatName
2. Colour
Fields: Colour, RawMatSpec, Price

I have established a 1 to many relationship between MatSpec in the Raw Material Table and RawMatSpec in the Colour Table.

Are you able to guide me in the creation of the query given this info?

Thank you so much!!
  • 0

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download