Solved

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

Posted on 2001-09-13
7
138 Views
Last Modified: 2010-05-02
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
0
Comment
Question by:mickdoherty
7 Comments
 
LVL 43

Expert Comment

by:TimCottee
Comment Utility
Mick, is this an access database?
0
 
LVL 22

Accepted Solution

by:
CJ_S earned 100 total points
Comment Utility
use the 0 and 1's.

regards,
CJ
0
 
LVL 27

Expert Comment

by:planocz
Comment Utility
The field called Archived will automatically be false.
as you access the field you can change it to true if needed.

0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:mickdoherty
Comment Utility
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
0
 
LVL 27

Expert Comment

by:planocz
Comment Utility
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
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
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
0
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

771 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now