Link to home
Start Free TrialLog in
Avatar of cmorok
cmorok

asked on

SETTING ACCESS FIELD PROPERTIES FROM VB

I've to create two new fields in an existing table of an existing Access Database from VB5. I used "createfield and append" to the table and it was all ok. But the problem is to set the Access properties that are not the same of DAO. For example i am not able to set the ACCESS FORMAT FIELD Property: I want to see "TRUE/FALSE" in the database record instead of seeing "0/-1" without stting it from Access. How can I do this ? How can I append a new Access property to DAO ? Thanks.
Avatar of cmorok
cmorok

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of vmano
vmano

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cmorok

ASKER

The problem is that if you open the database from Access you find  the field  fill from "0/-1"  and not True/false or Yes/No: how can I set the "format" property of Access that show the type of visualisation of the field ? Thanks for your   interest
Carlo.
Avatar of cmorok

ASKER

The problem is that if you open the database from Access you find  the field  fill from "0/-1"  and not True/false or Yes/No: how can I set the "format" property of Access that show the type of visualisation of the field ? Thanks for your   interest
Carlo.
when you create the field with dbBoolean as the option, it will be Yes/No in the design mode and when you open the table it will be a checkbox. i don't see any 0/1 in the table.
and as far as i know, you can not format a field while creating or after creation from your VB code, but you can always format the data which is being retrieved from the table.

I'm new to VB programming, but I also tried to change the Format property in the Access design mode, hoping it would carry over into VB.  But I think it only applies to how the data is displayed in Access.  When you see the Boolean field in a VB data grid, for instance, it will be 0/-1.  I think you have to do all the formatting from VB.