Database and checkes..

Posted on 2001-07-08
Medium Priority
Last Modified: 2010-04-06
I have an Access database. How can i write all of records that my database has and how can i create checkboxes for each record?. Ex: i have 5 records and i want my form reads all of the records and writes all records and creates one checkboxes for each?

Question by:yarasakol
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 6262240
Hi yarasakol,

can you be more specific? Do you wish to have checkbox in first column of DBGrid or just new TCheckBox controls on form where every checkbox has a caption like record in the table?

LVL 44

Expert Comment

ID: 6262605
I am little confused. Are you talking about records(a record can have 1 or more fields) or individual fields each having its own check box.

The Crazy One

Author Comment

ID: 6263023
I have a database that has 2 fields price and name. I want to list all of the record while record.eof and put a checkbox for each record that was listed. Sorry for my english...
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 44

Expert Comment

ID: 6263311
Do you want to store the checkbox value in the Database? I am not being nosy but just looking for clarification by asking what is the intent of these boxes. In other words what are they going to be used for. This info might help us to figure out how to find a solution for you.

BTW your english is good. :>)

Author Comment

ID: 6263964
When i list the records from database and put checkboxes each i will calculate whic records are checked and give a report to a user. But i don't want to use checked or not checked in DATABASE. Just on Form..
LVL 27

Expert Comment

ID: 6264373
in short

? add a calcualted field typ boolean, get a free dbgrid which are providing checkboxes for boolean fields, use the oncalculate-event and set the calculated field to true

meikl ;-)

Expert Comment

ID: 6279467
Use TListView to display the data. Setup the columns (Double-click the control and add 2, price/name, setup the captions). There's a code in the bd5 help file for sorting the rows according to the clicked column.

Checkboxes = True
ViewStyle = vsReport
ReadOnly = True
RowSelect = True

To retreive the records:
Table1.Filter := '';
while not Table1.EOF do
    with ListView1.Items.Add do
        Caption := Table1.FieldByName('NameField').AsString;
        SubItems.Add(FormatFloat('#,##0.00', Table1.FieldByName('PriceField').AsFloat));

To determine checked items:
for I := 0 to ListView1.Items.Count-1 do
  if ListView1.Items[I].Checked then
    {your stuff here ...}

Accepted Solution

SpideyMod earned 0 total points
ID: 8280621
I am unlocking this question in preparation for cleanup.  I will return in 7 days to finalize this question.  Please leave any recommendations for the final state of this question, I will take all recommendations into consideration.  Failing any feedback, I may decide in 7 days to delete or PAQ this question with no refund.  Thanks.

Community Support Moderator @Experts Exchange

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question