Inser the current date into a field in a Table

Hi, I want to insert the current date into "LastUpdateCost" field fromthe "CYCLETICKETNUMBER" table. I have the following code but is notcomplete. Can you help me?????    strSql = "INSERT INTO CYCLETICKETNUMBER (LastCostUpdate) Date ;"    db.Execute strSql, dbFailOnErrorThe code is incomplete because I don't know the what code I need to dowhat I want. Thanks for your help. Hope you have a nice day.JC
0
jeanhurtado
3/28/2007 3:56:13 PM
access 16762 articles. 3 followers. Follow

1 Replies
1150 Views

Similar Articles

[PageSpeed] 27

jeanhurtado@gmail.com wrote:> Hi, I want to insert the current date into "LastUpdateCost" field from> the "CYCLETICKETNUMBER" table. I have the following code but is not> complete. Can you help me?????>>>>    strSql = "INSERT INTO CYCLETICKETNUMBER (LastCostUpdate) Date ;">    db.Execute strSql, dbFailOnError>> The code is incomplete because I don't know the what code I need to do> what I want. Thanks for your help. Hope you have a nice day.What you want is an UPDATE not an INSERT.  INSERT is for adding new rows, not for changing data in existing rows.strSql = "UPDATE CYCLETICKETNUMBER SET LastCostUpdate = Date();"db.Execute strSql, dbFailOnError-- Rick Brandt, Microsoft Access MVPEmail (as appropriate) to...RBrandt   at   Hunter   dot   com
0
Rick
3/28/2007 4:05:39 PM
Reply:

Similar Artilces:

Date on Template
I created some templates and am choosing to bring over a date to be shown in the template when it is run. I have selected this attribute to be date only and not date & time. Every time I run the template it still shows date+time+time zone. Is there a way to show only the date and not the rest of the data. Thanks for any help anyone can provide. ...

Field TO of an Activity at blank
Hi, May I configure the TO into a E-mail Activity where ever I am in CRM. ex: I am in a contact I create an Activity I would like the field TO � blank Thanks, Sylvie There is no supported way to customize Activity objects. Sorry and Good luck! >-----Original Message----- >Hi, > >May I configure the TO into a E-mail Activity where ever=20 I am in CRM. > >ex: I am in a contact >I create an Activity >I would like the field TO =E0 blank > >Thanks, > >Sylvie > > >. > ...

OWA
OWA text field is always 'grayed out' - on new messages and replies. Small "x" button in upper left of text field seems to have no functionality. Subject field is OK. Bummer - do you have a question? If yes, then try asking it in an Exchange news group as Outlook Web Access is a function of Exchange, not Outlook. Microsoft.public.exchange.admin is a good place to start. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted w...

Temp Table cache
I am trying to figure out what this person is talking about: The main goal of temp table cache is to reduce the costs associated with temp table creation. The second temp table creation is much faster. Instead of dropping and creating the table we simply truncate it. All indexes and statistics are truncated and identity column values are reset. The following script demonstrates the performance impact of temp table cache. I'm executing two stored procs in a loop (10000 times). The temp table in the first stored proc is not cached (because the index is created outside of the CR...

Calculate Dates with If Then Else Statements
I need to calculate total years’ full time experience (i.e. 2.5 years, 3.25 years, etc.) in an Access 2003 database form. This is what I am trying to do: If the Full-Time End Date is Blank, use Today's Date, ELSE if the Full-Time End Date has a Date, use that Date. Separately, these two formulas work: =DateDiff("m",[FullTimeStartDate],Now())/12 =DateDiff("m",[FullTimeStartDate],[FullTimeEndDate])/12 My problem is writing a statement to calculate using the END DATE if one is entered, or NOW, if there is no end date. I have tried many combinations, but can’t ge...

How to split a field into 2 fields?
I imported a spreadsheet from Excel and would like to split one field into two fields. Many of the records in Field1 have a note in parenthesis ( ). If a record has anything contained in parenthesis, I would like to move that data to Field2. What's the best way to accomplish this? To get the word inside the parenthesis try something like SecondWord: IIf(InStr([MyLeeter],"("),Mid([MyLeeter],InStr([MyLeeter],"(")+1,Len([MyLeeter])-InStr([MyLeeter],"(")-1),"") FirstWord: IIf(InStr([MyLeeter],"("),Left([MyLeeter],InStr([MyLeeter],&q...

Deleting system locked fields
Does anyone know how I can get rid of the "Is revenue system calculated?" field on the Opportunities form? We always have user-provided values, and therefore have no need for this field, but I can't delete it. Anyone know how I can get around this? You can not delete those fields. But you can change the default value to "user provided". WIth some javascipt you should be able to hide it for the users. HTH, Frederic - Travi@ta www.microsoft-dynamics-crm.eu WiLLerZ schreef: > Does anyone know how I can get rid of the "Is revenue system > calculated?"...

how do you insert pictures into tables?
I want to make a table with the first row being the "Header". On the next row, I want to be able to insert a picture in the cell that will automatically format the cell to the size of the picture. Does that make sense? I basically want a placeholder for the picture but I want it INSIDE the table and I can not get it to do that. Thanks so much for your help and suggestions! With your cursor in the cell, fill, fill effects, picture tab. This will put the picture in the cell, Publisher does not automatically format the image to the cell size. You can manually resize the cell....

Filter Date
Hi, I have a form which contains a listbox (holding the values Process Date and Quantity) and I have a textbox which displayed the current month. What I want to do is when I click on a command button (cmdMonthDown) and the textbox value changes from May to April I want the values in the listbox to be filtered so that only those values are disiplayed that were entered in April. If I'm not making sense please let me know otherwise your help would be appreciated. Thanks Reference the text box as a parameter in the list box's RowSourcee, e.g. if the text box shows the month name in fu...

Task start/end dates from MS project to Workspace site
We are currently running MSPS 2007 with WSS 3.0. I am trying to create a list in one of the project work spaces. I would like to auto-populate two columns in that list with the start and end date of certain tasks from the Project Plan in MS project. I am thinking we can do this by linking these columns to the the project SQL database fields. So, 1) Do I use the published SQL databse for this? 2) Which fields in the SQL database would I have to link to get the Start and End dates? EggHeadCafe - Software Developer Portal of Choice AutoList in ASP.Net http://www.eggheadcafe.com/tutorial...

Adding Fields 02-14-06
Is there a way to add a picklist programmatically ? If there is, a sample code would be greatly appriciated. Thank You in advance ...

Excel2000: Can't access an Excel table though ODBC anymore!
Hi I have an Excel file on shared network resource. I have several dynamic named ranges defined there, and 2 fixed named ranges Name1=Sheet1!$B$2:$F$2999 Name2=Sheet2!$A$1:$E$400 In another workbook, I have to query data from table Name2. When I created the query, all worked fine, but now I discovered, that the query isn't working when the source workbook is closed. With closed source workbook, I can see only one named range - Name1 - as data source available. I use ODBC queries quite often, and there never was such problem before, so at moment I am at my wit's end! I'm waiting...

how to calculate the substraction between two dates
hi, i have two cells ,in which there are two dates. (for instance ,one cel l 08/02 ,the other 07/30) if the gap of the two dates is 2 days , something will be set to do. but it is difficult to judge the the substraction between two dates any good ideas. thanks Perhaps this might be of help .. Assume the *dates* "2-Aug-2004" and "30-Jul-2004" are input in A1 and B1, and A1:B1 is custom formatted as: mm/dd viz. it'll show as: In A1: 08/02 In B1: 07/30 Try in C1: =DAY(ABS(A1-B1))-1 Format C1 as: General or Number C1 will return: 2 i.e. the number of days...

Date Range
Hi, When I want the date rage appeared on the report header, I use textbox and put (qry criteria) in its recordsource. It works fine. However, For this time, I got a message like this ‘First([Between [From this date] And [To this date]])" Is there something wrong with the qry criteria? Would you please show me how to fix the problem? Thanks Chi It's very hard to understand the crtieria, can you post the full SQL What is the First in the beginning? Why there are to square brackes in the end And in the beinning? First([Between [From this date] And [To this date]])" T...

Date Format when incoming date can be 0
I have a date fiels yyyymmdd which can have a value of 0 or a valid date in recent past. Excel displays the 0 date as 01/01/1900 and the non zero dates as expected. Cant figure this out , any help would be appreciated. Excel uses a sequencial number from either 1/1/1900, or 1/1/1904 (depending on your options) as the date value for Example 6/3/2005 is 38506 using the 1/1/1900 if the cell is formatted as a date it is responding with the date it thinks you mean. If you want the cell to display a zero =if(Date=0,"0",date) "DP NY10601" wrote: > I have a date fiels y...

Turn on Automatic Formula Fill in Table
I turned off the 'automatically fill th column with this formula' option in Excell 2007 but I can't see how to turn it on again. Can anyone point me in teh right direction? TIA Excel 2007 Excel Options > Proofing > AutoCorrect Options > Autoformat As You Type > Fill formulas in tables to create calculated columns ...

Calculated Field in form to table
Can you take a calculated field from a form and pull it in to a table?? ...

PIVOT tables and publishing thrm on a webpage
Is there a way to publish a pivot table in a html page but still kee exactly the same funcitonality that you have on a Excel spread sheet either by converting it to a java applet or something else . Any hel would be much appreciate -- Message posted from http://www.ExcelForum.com ...

Pivot table, calculating % difference of subtotal rows
This is what I need to do: I have rows of data in a pivot table that have subtotals associated with them (automatically generated via the pivot table). I need to to take the subtotals for 2009 and 2010 and calculate the % difference. Here's a screenshot of what I'm talking about: http://home.comcast.net/~wilsoch/PercentDiff.jpg Is this even possible or am I going to have to do this manually? Hi I have'nt seen the screenshot as am at work , go to Pivot Table>Formulas>Calculated Field wilsoch@comcast.net wrote: >This is what I need to do: I have rows of ...

No content in message field anymore
For the last two days when I open my email client I see no content in the message field. Each email is blank with an attachment paperclip in the upper right hand corner. When I click the paperclip I have the choice of a txt file (which will not open up) or an htm file which will open. This is driving me crazy and I don't want to get rid of windows mail...any suggestions on how to fix this? Which antivirus are you running? Some of them cause problems with Windows Mail over time. =20 Try running the various repair functions in the WMUtil program: http://www.oehelp.com/...

Pivot Table question #4
Hi I have spreadsheets that take data via a pivot table from an OLAP cube that is held on a terminal server. The spreadsheets hold figures entered by me and figures obtain from the pivot table. I want to enable the automatic update on the pivot table but the pivot table is sorted by a project number obtained from the OLAP cube. My problem is if a new project is added to the OLAP cube then it is automatically selected from the drop down list. I want to be able to turn this off so that it only selects the project I have previously chosed. For example if I have selected the filter nu...

Automatically filling in "full name" field
I would like to add the "fullname" field to the Contact form. Is there someway to make this field automatically fill in with the information from "firstname" + "middlename" + "lastname" + "suffix"? If this can be automatically filled in, could the field later be manually changed? You will find that if you add the fullname field to the form, it will be greyed out, you can't type into it. It will be populated after you create a new contact and enter the first and last names and save the contact. And it will change if you change the f...

Field Options and Combo Lists?
Wondering if anyone knows how to make this work. I have two fields in a form, both Combo Boxes. I want the Value List in the first box to determine what the Value List in the second box will be. For example, if the first box is all State Names, if you select California, the second box provides all of the City names for that state. However, if you change the first box to Utah, the second box provides all the City names for Utah. In the afterupdate event of the states combobox write code to adjust the rowsource of the city combobox. Something like: Me.combo_STATE.RowSource = &quo...

Multi-field primary key, no dupes
I can select multiple fields and make a primary key indexed with no duplicates. But I just realized my criteria for "no dupes" holds only if another field is empty (no value). For example, if my primary key is: Shirts-Mens-Style102-Large-Green-05Jan08 then I can't enter another order for the same product on the same day. That's good - unless the order's been shipped and another one is needed. So no duplicates, but only as long as the ShipDate field for that record is empty. Can this be done easily? Or should I look into a different way to prevent duplicates? Ed ...

print folder in table style
Hello all, My CU wants to print a list of files in a folder. He use Outlook 2002. Click Other Shortcuts -> My computer -> choose a folder -> Click the print icon on toolbar -> choose Table Style -> print preview The header and footer can be printed properly. However the content is blank. I mean: there is no file in the list. I can print properly at my side. However at the CU side, there are 2000 users encounter the same problem. And there are four kinds of printer. All have this problem. Any suggestion? Thanks! ...