-
How to add blank date to recordset??
How do I add a date to a recordset? My app is user interface to an access
db which loads records from the database. But if user wants to add records
I am having problems with adding to date fields. I would like to add a blank
record but using the addNew method as below I seem to have to add a value.
This is how I have been adding records. Is there any way to do this with
the = expression??
recordset.AddNew
recordset!Date = "4/4/44"
recordset.Update
I can get away with (= "") for textfields, but for dates it seems I have
to add a real date.
Any help would be greatly appreciated
Mark Burns
-
Re: How to add blank date to recordset??
Nevermind, I thought I had tried to AddNew without specifying the individual
fields before and it didn't work, but I guess not. If I don't specify the
fields then each record not specified is blank
Mark
-
Re: How to add blank date to recordset??
Mark,
In addition, when you do supply dates, you sould either use the CDate
function, or delimit the date values with #s:
rs!DateField = "#4/4/01#"
the # is the H+Jet dlimiter for Date values.
Arthur Wood
"Mark Burns" <mburns@slip.net> wrote:
>
>Nevermind, I thought I had tried to AddNew without specifying the individual
>fields before and it didn't work, but I guess not. If I don't specify the
>fields then each record not specified is blank
>
>Mark
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks