Need a help for updating many tables !

Hi, All !
I need a thought for hepl !
I have 4 tables related together through a field(ContNo).
But there are some reasons, I use temporary value for recording ContNo
field. After that I want to update the temporary value by new value.
Is there any way to do this fastly ?
I thought about using VBA Openrecordset for each Table and update
ContNo field through a form.
Any ideas to solve this problem ?
Thanks for ur time.
Luan

0
luanhoxung
5/9/2007 10:20:34 AM
access.formscoding 7493 articles. 0 followers. Follow

3 Replies
611 Views

Similar Articles

[PageSpeed] 53

On 9 May 2007 03:20:34 -0700, luanhoxung@gmail.com wrote:

>Hi, All !
>I need a thought for hepl !
>I have 4 tables related together through a field(ContNo).
>But there are some reasons, I use temporary value for recording ContNo
>field. After that I want to update the temporary value by new value.
>Is there any way to do this fastly ?
>I thought about using VBA Openrecordset for each Table and update
>ContNo field through a form.

The fastest way would be straight SQL:

CurrentProject.Connection.Execute "UPDATE YourTable Set ContNo=" & NewValue & " WHERE ContNo=" & OldValue

If ContNo is a Text field, you'd need to surround it with single quotes

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
0
Scott
5/9/2007 11:00:25 AM
On May 9, 6:00 pm, Scott McDaniel <scott@NoSpam_Infotrakker.com>
wrote:
> On 9 May 2007 03:20:34 -0700, luanhox...@gmail.com wrote:
>
> >Hi, All !
> >I need a thought for hepl !
> >I have 4 tables related together through a field(ContNo).
> >But there are some reasons, I use temporary value for recording ContNo
> >field. After that I want to update the temporary value by new value.
> >Is there any way to do this fastly ?
> >I thought about using VBA Openrecordset for each Table and update
> >ContNo field through a form.
>
> The fastest way would be straight SQL:
>
> CurrentProject.Connection.Execute "UPDATE YourTable Set ContNo=" & NewValue & " WHERE ContNo=" & OldValue
>
> If ContNo is a Text field, you'd need to surround it with single quotes
>
> Scott McDaniel
> scott@takemeout_infotrakker.comwww.infotrakker.com

Hi Scott !
Thanks for ur response !
I think the code you advise just Updating the ContNo of 1 table,
Can I Update 4 tables in 1 code ??
Thanks again.
Luan from VietNam

0
luanhoxung
5/9/2007 3:45:30 PM
On May 9, 10:45 pm, luanhox...@gmail.com wrote:
> On May 9, 6:00 pm, Scott McDaniel <scott@NoSpam_Infotrakker.com>
> wrote:
>
>
>
>
>
> > On 9 May 2007 03:20:34 -0700, luanhox...@gmail.com wrote:
>
> > >Hi, All !
> > >I need a thought for hepl !
> > >I have 4 tables related together through a field(ContNo).
> > >But there are some reasons, I use temporary value for recording ContNo
> > >field. After that I want to update the temporary value by new value.
> > >Is there any way to do this fastly ?
> > >I thought about using VBA Openrecordset for each Table and update
> > >ContNo field through a form.
>
> > The fastest way would be straight SQL:
>
> > CurrentProject.Connection.Execute "UPDATE YourTable Set ContNo=" & NewValue & " WHERE ContNo=" & OldValue
>
> > If ContNo is a Text field, you'd need to surround it with single quotes
>
> > Scott McDaniel
> > scott@takemeout_infotrakker.comwww.infotrakker.com
>
> Hi Scott !
> Thanks for ur response !
> I think the code you advise just Updating the ContNo of 1 table,
> Can I Update 4 tables in 1 code ??
> Thanks again.
> Luan from VietNam- Hide quoted text -
>
> - Show quoted text -

Hi Scott again !
The code works great !
Sorry abt previous posting without checking ! :<
But I have to close the database and reopen it , the ConNo is
updated !?
I use the code in AfterUpdate of NewValue field.
How can I do update the ContNo after I type new value in NewValue ??
Thanks in advance.
Luan from VietNam

0
luanhoxung
5/9/2007 4:01:53 PM
Reply:

Similar Artilces:

#DIV/0! displayed in Pivot Tables
I create Pivot Tables that use calced fields. Sometimes the calced fields divide zero by zero which results in #DIV/0! showing up in the RowTotals and TotalTotals. I can use the Table Options For Error Value Show (blank), which removes the #Div/0! from the table display, the only problem with doing this is the TotalTotal cells also show up as blank. Here's my code for creating the calced field. ActiveSheet.PivotTables("PivotTable2").CalculatedFields.Add "Weighted Avg Price", _ "=rev / PosSold" With ActiveSheet.P...

Update error 8024402F Vista SP2
Has anyone found an answer to this problem yet? Yes. PeoplesChoice@Chicago.net wrote: > Has anyone found an answer to this problem yet? PA Bear [MS MVP] wrote: > Yes. > > PeoplesChoice@Chicago.net wrote: >> Has anyone found an answer to this problem yet? 0x8024402F WU_E_PT_ECP_SUCCEEDED_WITH_ERRORS External cab file processing completed with some errors. See - You may encounter temporary connection-related errors when you use Windows Update or Microsoft Update to install updates http://support.microsoft.com/kb/836941 MowGreen ================...

HTML help already running.
I'm using the simple function below to run up my HTML help file but I need a method to test if it already running. Any ideas? void CMainFrame::OnHelpChm() { CString strFileName; CString strName; char szBuffer[_MAX_PATH]; GetModuleFileName(AfxGetInstanceHandle(), szBuffer, sizeof(szBuffer)); strFileName = szBuffer; strName = strFileName.Left(strFileName.GetLength() - 10); strFileName = strName + _T("easynn-plus.chm"); if(ShellExecute(NULL, "open", strFileName, NULL, NULL, SW_SHOWNORMAL) <= (HINSTANCE)32) { AfxMessageBox(_T("No HTML Help app...

Please Help #4
How can I output the last value entered in a range of cells into anothe cell? Example (Range= A1:A100, last value entered in A50) I want the value from A50 to be uotputed into B1 Thank -- Message posted from http://www.ExcelForum.com Hi if you have no blanks rows in between in column A enter the following in B1: =OFFSET($A$1,COUNTA(A1:A100)-1,0) Frank > How can I output the last value entered in a range of cells into > another cell? > Example (Range= A1:A100, last value entered in A50) > I want the value from A50 to be uotputed into B1 > Thanks > > > --- > Messa...

Exchange 2000 SP3 updates ans security patches
I have Exchange 2000 Version 6.0 (Build 6249.4: Service Pack 3) running on Windows 2000 Server SP4. What is the best way of checking for missing security patches and updates? Would it be enough if I run MBSA 2.0 and rely on it only? MBSA is not showing any patches/updates missing however the above build number seems to me a lillte old comparing to those I saw when researching the web about Exchange 2000. Does the updates not change the build number? Thank you. "mtler" <mtler@discussions.microsoft.com> wrote: >I have Exchange 2000 Version 6.0 (Build 6249.4: Service Pa...

Help Update
After downloading and installing the new Online Help Update, and following the instructions to update the files, The link to the pages failes when requesting Help on this page or clicking the ? on a CRM window. Pages are there, and work fine through the TOC or when running from Outlook. Any ideas how to fix the link from the Web Client? -- Gary G. Bluewave Computing ------=_NextPart_0001_79CFF727 Content-Type: text/plain Content-Transfer-Encoding: 7bit <GaryG@discussions.microsoft.com> wote: > After downloading and installing the new Online Help Update, and following > ...

Need a formual
Help - I have tried this with vlookup and match. For some reason I just can't make it work. Here is my senario: I am in the parts business. I need to compare inventory numbers constantly against sales. I will keep this simple. In column a1:a5 I put the following values: 1515,1516,2020,1034,1556. All valid parts numbers. In another column I want to put in numbers but not in any particular order. I want to be able to record hits. If I put in the "B" column a number from "A" I want a return argument that the spreedsheet has found a "match" The real l...

Could use some help after crash
My computer crashed (turned out to be my mother board) and I have numerous back ups (.mny) (from cd and floppy) that I've tried to install on my new computer and every one of them want's a password. One of my files did have a password and I know FOR SURE i'm entering the right one and its still not working. I've tried installing to Money 2000 (the original one i had) and 2006 which the new computer has. Neither seems to work at all. I need this info for taxes and don't EVEN want to try to re-create it can anyone help with this? Thanks in advance for ANY help. Cheryl ...

do i need an if statment or a lookup or other
Hi this is my first excel post so I�ll try hard to explain what it I� after I have 4 sheets that are updated every day with data; I would like t create a summary once a week of specific data to let me know wha going. Example in column f7 if there ia letter and there a 7 possible for a t j then take tha letter and any data across from it and display on different page in a summary. I�m working with sort codes and names and projects numbers across th screen, with a calendar with up to 7 letter representing an actio (late, finished, early, bad sample �L�, �E�,�,,�F�) so if on Dec th 09/12 I u...

Need VB5 code for VB6 Split instruction
I have a VB5 program into which I have loaded vbSendMail(written in VB6). I need to replace the "Split" instruction, " sFilenames = Split(.filename, vbNullChar)", in the following code: Private Sub cmdBrowse_Click() Dim sFilenames() As String Dim i As Integer On Local Error GoTo Err_Cancel With cmDialog .filename = "" .CancelError = True .Filter = "All Files (*.*)|*.*|HTML Files (*.htm;*.html;*.shtml)|*.htm;*.html;*.shtml|Images (*.bmp;*.jpg;*.gif)|*.bmp;*.jpg;*.gif" ...

Table List
I've seen two different Great Plains utilities that have the capability of reading the list of tables out of the dynamics dictionary. One is the DDB utility for browsing the data, and the other is the GenView utility that comes in the SDK. My question is how are they getting a list of tables? I'm still ramping up on SanScript, Dexterity, and Continuum, but I'm not finding anything that would allow me to get a list of tables. Any pointers? -Bill Bill Have a look at the Extras page of http://www.rocktonsoftware.com/ for the Pushing the Limits with Dexterity materials. Thes...

Pivot Table Problem #2
I have a pivot table I created that basically counts items so that I have am item name and count side by side after the pivot table completes as below Item1 24 Item2 15 Now my issue is that I want to count a secondary attribute of these same items (say color for example) and express it as a percent of the count already in the pivot table. I have no problem getting the count but I can't seem to figure out how to get the percentage part. I see options to have the data as a % of the column or row, but not as a percent of the existing count in the table. For example the finishe...

Pivots tables refreshed but not updated
When refreshing data in Pivot Tables it says that it has been refreshed but the data has not been updated. This mostly occurs when linking to data in another spreadsheet ...

Serious Help Needed!!!
My question comes in two parts: Part 1 - I have a Form with a subform (main subform) what when you double click on a field in the subform another subform puts up. On that second subform it sums the "Projected_Man_Hours" in a text box and "Actual_Man_Hours" in another text box in the footer of the subform. I would like to transfer the values from the two text boxes on the second subform to two text boxes on the "Main subform" then two the Main Form. To transfer the values for the second subform to the Main subform I am using : =frmHour_Worked_subfor...

CFileDialog: Newbie Help Needed!
Hi! I'm new to MFC. I am trying to subscribe to some of the events of a CFileDialog. How can I do this? http://msdn2.microsoft.com/en-us/library/8dwz4azc(VS.80).aspx (I want to subscribe to the "Overrideables") ~Matt ...

Chart will not update!
Hi all I've had a look through the various newsgroups and not found anything like this to refer to, so if anyone can shed any light I'd be grateful... I have a file with about 15 sheets, each with a fair amount of complex calculations, involving lookups and suchlike. Most of the sheets also contain one or more charts. The problem is that if I update the data, all the data re-calculates (automatic calculation is set to On and Iterations is set to 100) but the charts refuse to update. Pressing F9 or CTRL-ALT-F9 doesn't update the charts, although it does update all the worksheet c...

Help with Loop Apend Query in VBA
I have a table of 14 colums, first 2 are text and the last 12 are numeric with the field name eg. Jan-08, Feb-08, etc I need to take this data month by month and append it to a table of 4 colums with the first 2 colums as text then a date field and then a value field. What is the VBA code for DoCmd.RunSQL and the loop code I need to use? Regards Chase You don't have a database, you have a spreadsheet. You have back yourself into a really ugly corner. Having field names like Jan-08, etc means every year you have to change your table field names and all code that reference these...

Xpath with Namespace retruns NULL, please help
I am using the following code to query for a single node, yet my results are always NULL. Please help, I've tried everything adn I am unable to get a result. XmlDocument xml = new XmlDocument(); xml.LoadXml(strNLETSMessage); XmlNamespaceManager nsmgr = new XmlNamespaceManager(xml.NameTable); nsmgr.AddNamespace("n", "http://www.nlets.org"); nsmgr.AddNamespace("j", "http://www.it.ojp.gov/jxdm/3.0"); XmlNode test = xml.SelectSingleNode("/n:NLETS/n:NLETSInquiryMes...

"Cannot update the appointment because the corresponding item in the folder you syncronized does not match this item"
Using Outlook 2003 with Meeting Room Manager (MRM) plugin installed, I am getting the error message above when trying to edit or delete a calendar entry. If I say yes to resolve the conflict, two calendar entries appear identical. I am acting as a delegate for another Outlook 2003 user. I have not been able to find any specific information on this message and what I need to do to prevent a conflict which does not look like a conflict. Any ideas? url:http://www.ureader.com/gp/1070-1.aspx Contact support for the addin that you are using. -- Robert Sparnaaij [MVP-Outlook] Coauthor, C...

Update
Thanks in advance... How do I get this to auto update after the Tickbox has been changed without clicking in Name_on_trophy Private Sub Name_on_trophy_Click() If Tickbox = False Then Name_on_trophy.Enabled = True Name_on_trophy.Locked = False Else Name_on_trophy = Player Name_on_trophy.Locked = True End If End Sub ...

Urgent help reuqired
Hi all, I am trying to do MSDE setup using my custom wizard. This custom wizard i have created using MFC Wizard97. The problem is when i call MSDE setup.exe (from my custom wizard) with appropriate parameters, the setup starts. But after sometime the setup hangs. The strange thing to be noted here is all the registry settings, file copying etc. is done by the time the MSDE setup hangs. Also one more thing to note here is when i kill the MSDE setup a dialog box showing the file extraction (this dialog comes when i normally install the MSDE ) pops up and the MSDE setup fails. Can someone tell ...

Mailbox Manager Skipping Mailboxes
Hi, I have Exchange Server with SP4 running on Windows 2000 SP4. Recently the Mailbox Manager has been skipping mailboxes and when it happens, we have to restart the service to make it works again. Does anyone have any idea? Thanks in advance, Alex Hey Alex, You may want to turn up logging for mailbox manager to see what's happening when it's skipping those mailboxes. Should be on the Advanced Tab. Also check out the version of mailbox manager as there have been some updates for it too. For a description of the logging levels you can look at KB article: 244586 XADM: Mailbox...

Cannot Display Bitmap in Picture Control
Hi all, I am trying to show a bitmap from a MySQL database in MFC in a picture control. The code appears to work all the way up to the SetBitmap method. The bitmap is created successfully, but then I cant seem to bind it to the picture control. Any ideas?!?!? Many Thanks in advance, qryStr = _T("select bitmap from imageTable"); Query query = m_pdbCtrl->getQuery(); query << qryStr; Result res = query.store(); Row row; CString strData ; const char *image; const Result::const_iterator ie( res.end() ); for (Result::iterator iter = res.begin(); iter != ie; ++iter) { ...

Worker's Comp Report Doesn't need a page header between wc codes
V9 has added a page header between Worker's Comp Codes. We have 3 page headers on page 4 for example...another increase in report length. I just noticed the Days Worked column is the one that always has zero's. I wrote in a previous "suggestion" that it was Hours Worked. We could lose the Days Worked columnand have room on one line again for a person instead of ID and name on one line and data on the line below it. This make it very difficult to work with. Thank you very much. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the ...

Pivot Table in a Shared Workbook
Hi! Can I use pivottables in a shared workbook? The reason I ask is that its greyed out in a shared WB but not in a non-shared. I can't find anything on this, perhaps somebody can help? thanks! Chris You can't change or create a pivot table in a shared workbook. For more information on shared workbooks, look in Excel's Help, under the topic 'Features that are unavailable in shared workbooks' Riskybizniz wrote: > Hi! Can I use pivottables in a shared workbook? The reason I ask is that its > greyed out in a shared WB but not in a non-shared. I can't find any...