Link to home
Start Free TrialLog in
Avatar of mickdoherty
mickdoherty

asked on

DDL Question: How do I set the format Property of a field

I am using ADO to create tables, fields & relationships etc., I have created a field called Archived which I created as a boolean (Yes/No). How do I then set this fields format property to TRUE/FALSE???

Any code would be a help

Thanx in advance


Mick
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Mick, is this an access database?
ASKER CERTIFIED SOLUTION
Avatar of CJ_S
CJ_S
Flag of Netherlands image

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 Howard Cantrell
The field called Archived will automatically be false.
as you access the field you can change it to true if needed.

Avatar of mickdoherty
mickdoherty

ASKER

Tim, Yes this is an Access database!

CJ, Do you mean use 0 and 1's in my vb program.?
e.g. rs![Archived] = 1  or rs![Archived] = 0
If so... can't do that!!!

Planocz, Go back to sleep. I don't want know how to set the DefaultValue! Even if that's what your talking about???


Mick
Sense I'm asleep try this code...
 
    Select Case rs![Archived]
        Case True
             rs.Update "Archived", False
        Case False
             rs.Update "Archived", True
      End Select
Hi mickdoherty,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept CJ_S's comment(s) as an answer.

mickdoherty, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
Per recommendation, force-accepted.

Netminder
CS Moderator