Re: Questions on combo box and MSFlexGrid
- From: "Reds@home" <abc@xxxxxxx>
- Date: Sat, 25 Mar 2006 01:01:12 +0800
Thank you for your reply.
I will take a look at the DBGRID and DBCombo and give them a try.
Thank you again!
"nrford" <nrfordmsvb@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:eyl8ix0TGHA.5900@xxxxxxxxxxxxxxxxxxxxxxx
"Reds@Office" <abc@xxxxxxx> wrote in message
news:OZSBn8xTGHA.736@xxxxxxxxxxxxxxxxxxxxxxx
I am writing a VB project that connected to an Access Database.
An interface is created for users for querying and comboboxes are
provided
for them to choose different field(Actually these are the Field Name in
the
Access table) as they needed.
My first question:
When the users choose a fieldname in combobox, anther combobox will be
appeared for them to input data. Is there any method that can sort all
the
values in the field(from the Access DB) and place them in ascending order
in
the combobox?
My second question:
When the query is performed(By using SQL statement), I would like the
result
to be displayed in a MSFlexgrid table. How can I place the fieldnames and
the records in the table as it is looked like in Access?
In both cases, you have two alternatives:
1. Use a databound control -- DBCombo and DBGrid, respectively.
2. Use a standard control and manually fill it.
People here seem to hate databound controls in general.
I have used DBGrid extensively and never had any kind
of problem with it. I have tried DBCombo and always
had problems, so I use the 2nd alternative in that case.
Just use a standard Combo box with the Sorted property
set to True, and manually read the fields into it.
I think that most people's objection to DBGrid is for data entry.
I usually use DBGrids for easy viewing of the database and use
other controls for data entry. See a screen shot at
http://www.cardsharkgames.com/CSBBEditor.jpg
However, the last app I wrote uses DBGrid for data entry
because I didn't need as much control over the data entry.
It works fine. I control input using the DBGrid Change and
KeyDown and some other events. See a screen shot at
http://www.cardsharkgames.com/bbhep.jpg
.
- Follow-Ups:
- Re: Questions on combo box and MSFlexGrid
- From: Bookreader
- Re: Questions on combo box and MSFlexGrid
- References:
- Questions on combo box and MSFlexGrid
- From: Reds@Office
- Re: Questions on combo box and MSFlexGrid
- From: nrford
- Questions on combo box and MSFlexGrid
- Prev by Date: Re: Syntax Error - Missing Operator - When Using Date !
- Next by Date: Re: Questions on combo box and MSFlexGrid
- Previous by thread: Re: Questions on combo box and MSFlexGrid
- Next by thread: Re: Questions on combo box and MSFlexGrid
- Index(es):
Relevant Pages
|