There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot browser bsod computer cpu crash css dell desktop driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware missing monitor network networking outlook outlook 2003 outlook 2007 outlook express password popups problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Access 2k


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
prodsupptech's Avatar
Senior Member with 268 posts.
 
Join Date: Feb 2004
Experience: Pretty Savvy
26-Oct-2004, 04:50 PM #1
Access 2k
I copied my friends post from another forum. Below is his request. Please let me know if anyone can help.

First off, Im using Access 2000, and created a new module.

Ok, Here is the info:

-A table called Indexing contains a field Index9
-Index9 needs to be updated to the current date, in a particular format.
-the format is as follows: YYYY-MM-DD

I would Like to create a module to do this, but im not sure how i would make this run or work, meaning do i make a function? how do i get it to run? using a macro? etc etc...

But first off, how do i update Index9 with the date in the particular format?

Here is the code i could come up with:

Sub Format()

Dim strSQL As String

Dim currentdate As Date
Date = Now 'Format(Now, "yyyy-mm-dd") how do i format this?


strSQL = "UPDATE Indexing, SET [Index9] = Date, WHERE [Index9] Is Null;"

DoCmd.RunSQL strSQL

End Sub
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
26-Oct-2004, 04:58 PM #2
Are you updating the field from a form or just from the query? Date is a reserved word so use something else.
Rockn's Avatar
Computer Specs
Distinguished Member with 17,888 posts.
 
Join Date: Jul 2001
Location: Mexico of the North, MN
Experience: Disenfranchised American Male
26-Oct-2004, 05:10 PM #3
strDate = Format(Now(),"yyyy-mm-dd")
prodsupptech's Avatar
Senior Member with 268 posts.
 
Join Date: Feb 2004
Experience: Pretty Savvy
27-Oct-2004, 10:58 AM #4
Originally he was making a program in VB to do this. We both realized that it was had probably been the long way. Your help worked very well and we both thank you.

Thanks Again

Last edited by prodsupptech : 27-Oct-2004 11:06 AM.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:38 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.