Results 1 to 7 of 7

Thread: Color dialog box and MS Access

  1. #1

    Thread Starter
    Junior Member mstrmnd's Avatar
    Join Date
    Mar 2011
    Location
    India
    Posts
    30

    Question Color dialog box and MS Access

    I am making an application for a powder coating company. I need to provide the user with the facility of selecting a color and save the color into the database and retrieve when required. Please tell me guys how can i do that?

    database name: database.mdb

    Secondly, I also wanted to know that is it necessary to have primary keys in Access database? I haven't assigned any primary key and haven't felt the need yet.

  2. #2
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Color dialog box and MS Access

    You will find examples plus other useful information that may be of use in the Database Development FAQ.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  3. #3

    Thread Starter
    Junior Member mstrmnd's Avatar
    Join Date
    Mar 2011
    Location
    India
    Posts
    30

    Question Re: Color dialog box and MS Access

    I didn't find anything relevant to my post. Nor did I found anything that would help me to solve my query. Can't you post an 'answer' or 'solution' rather than links?

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: Color dialog box and MS Access

    The articles in the DB FAQs show you how to save data to a database and get it back again, which is part of your question.

    In terms of selecting a colour, I recommend using the Common Dialog control (add it to your program via "Project"->"Components").


    Secondly, I also wanted to know that is it necessary to have primary keys in Access database? I haven't assigned any primary key and haven't felt the need yet.
    Primary keys are not essential, but as a general guideline you should only leave them out if you are certain that they will cause problems for that particular table.

    There are various reasons why Primary Keys are a good idea, the main one being that they remove the possibility of having "bad" duplicate data. With PK's you cannot accidentally create two identical records (which you then can't edit/delete uniquely, you have to work with both), or two records that contain data the same data for the PK (which would indicate you have designed the table(s) or PK badly).

    You can find more details in the many different articles/books that explain what a PK is.

  5. #5

    Thread Starter
    Junior Member mstrmnd's Avatar
    Join Date
    Mar 2011
    Location
    India
    Posts
    30

    Re: Color dialog box and MS Access

    Quote Originally Posted by si_the_geek View Post
    The articles in the DB FAQs show you how to save data to a database and get it back again, which is part of your question.

    In terms of selecting a colour, I recommend using the Common Dialog control (add it to your program via "Project"->"Components").
    But Sir, how do I save it in the database? I guess there is no type color in access.

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,930

    Re: Color dialog box and MS Access

    VB doesn't have a colour type either, it just uses Long (occasionally with an alias such as OLE_COLOR, but still a Long).

  7. #7
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Color dialog box and MS Access

    Quote Originally Posted by si_the_geek View Post
    In terms of selecting a colour, I recommend using the Common Dialog control (add it to your program via "Project"->"Components").
    mstrmnd could also use the api posted here if he doesn't want to use a bulky control.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width