Solved

Database and checkes..

Posted on 2001-07-08
8
126 Views
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?

Thanks
0
Comment
Question by:yarasakol
8 Comments
 
LVL 9

Expert Comment

by:ITugay
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?

-----
Igor.
0
 
LVL 44

Expert Comment

by:CrazyOne
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
0
 

Author Comment

by:yarasakol
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...
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 44

Expert Comment

by:CrazyOne
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. :>)
0
 

Author Comment

by:yarasakol
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..
0
 
LVL 27

Expert Comment

by:kretzschmar
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 ;-)
0
 
LVL 1

Expert Comment

by:piscean
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.

TLISTVIEW:
Checkboxes = True
ViewStyle = vsReport
ReadOnly = True
RowSelect = True

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

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

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8280621
All,
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.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Process Javascript errors with Delphi TWebBrowser 1 139
Magic Software info 18 132
control image tags in a string ? 12 134
FMX and jaudiotracker playing memory stream 29 80
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

832 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