Data Aware control question 
Author Message
 Data Aware control question

Hi there,

How do I set default values on conrols such as DBComboBoxes, so that it
will be as if the USER had set the value (ie. the value is set both
visually and
within the database.)

I used the itemindex property to set the value, and that correctly picked
the
value I wanted, but it left the field blank when the record was posted to
the
database. Any suggestions, especially with code fragments would be most
appreciated.

Thanks in advance,

-Greg
--------------------------------------------------------------------------
------
Greg Stockton          | An idea is not responsible for

--------------------------------------------------------------------------
------



Thu, 18 Mar 1999 03:00:00 GMT
 Data Aware control question

Quote:

>Hi there,
>How do I set default values on conrols such as DBComboBoxes, so that it
>will be as if the USER had set the value (ie. the value is set both
>visually and
>within the database.)
>I used the itemindex property to set the value, and that correctly picked
>the
>value I wanted, but it left the field blank when the record was posted to
>the
>database. Any suggestions, especially with code fragments would be most
>appreciated.
>Thanks in advance,
>-Greg
>--------------------------------------------------------------------------
>------
>Greg Stockton          | An idea is not responsible for

>--------------------------------------------------------------------------
>------

I had exactly the same problem. Just set the field values instead of
the control values. For example, if you had:

        CheckBox1.Checked := True;

change it to:

        Table1Field1.Value := True;

This should correct the problem.

Regards,

Jani J?rvinen
Helsinki Finland



Fri, 19 Mar 1999 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Data-aware controls that be aware of nothing

2. Questions about data-aware controls

3. Data Aware OCXs and Data Controls

4. Data aware controls and Microsoft Access

5. Data Aware Controls

6. Data aware controls - any good?

7. Non-Data aware controls and ADO

8. Updating data aware controls

9. Data-aware combo control

10. Multi-Field Data Aware Control [How?]

11. clipboard cut/paste with many data aware controls

12. large local databases and data-aware controls


 
Powered by phpBB® Forum Software