How to change value of field in one to many relation ship

Dear Freinds

I have 2 tables with 1 to many relation ship
table1 customer
table2 collection sub
both of them are linked through customer ID

I want to update one of the field 'lastAMCdate' which is equal to 
'AMCtodate' in the latest enrty ie last row.

Please advise how I can update programatically above field in custoemr table

Please advise


Rgds

Ramesh shetty




0
Shetty
2/5/2008 10:11:43 AM
access 16762 articles. 3 followers. Follow

2 Replies
707 Views

Similar Articles

[PageSpeed] 53

use an updatequery
-- 
Maurice Ausum


"Shetty" wrote:

> Dear Freinds
> 
> I have 2 tables with 1 to many relation ship
> table1 customer
> table2 collection sub
> both of them are linked through customer ID
> 
> I want to update one of the field 'lastAMCdate' which is equal to 
> 'AMCtodate' in the latest enrty ie last row.
> 
> Please advise how I can update programatically above field in custoemr table
> 
> Please advise
> 
> 
> Rgds
> 
> Ramesh shetty
> 
> 
> 
> 
> 
0
Utf
2/5/2008 12:46:01 PM
"Shetty" <rameshmshetty@gmail.com> wrote in
news:euQvB#9ZIHA.1208@TK2MSFTNGP03.phx.gbl: 

> Dear Freinds
> 
> I have 2 tables with 1 to many relation ship
> table1 customer
> table2 collection sub
> both of them are linked through customer ID
> 
> I want to update one of the field 'lastAMCdate' which is equal to 
> 'AMCtodate' in the latest enrty ie last row.
> 
> Please advise how I can update programatically above field in
> custoemr table 
> 
> Please advise
> 
> 
> Rgds
> 
> Ramesh shetty

You should not be updating a value in the customer table, because 
this violates normalization principles. All you need to do is use 
the DMax("AMCtodate","[collection sub]","[Customer ID] = " & 
[Customer].[Customer ID]) as an expression in any query, form or 
report where you want the lastAMCdate.

-- 
Bob Quintal

PA is y I've altered my email address.

-- 
Posted via a free Usenet account from http://www.teranews.com

0
Bob
2/5/2008 10:09:36 PM
Reply:

Similar Artilces:

How can i move a macro from one computer to another
i would like to move a macro from one computer to another i Excel Macros live in excel workbooks. So you can just copy that workbook with the macro to the other pc and open it there. TorToms wrote: > > i would like to move a macro from one computer to another i Excel -- Dave Peterson ec35720@msn.com Or you could export the module containing the macro as a *.BAS file, email it to other computer then import to another workbook. Gord Dibben Excel MVP On Wed, 08 Sep 2004 07:05:48 -0500, Dave Peterson <ec35720@msn.com> wrote: >Macros live in excel workbooks. > >So ...

Changing start date
Scenario: In OL 2003, I have an event that's two weeks long, starting June 1 and ending June 14. I want to change the start date to May 27 but leave the end date alone. If I change the start date, OL automatically changes the end date to preserve the two-week duration. Is there a way to change the start date without affecting the end date? Richard Evans <infodex@mindspring.com> wrote: > In OL 2003, I have an event that's two weeks long, starting June 1 and > ending June 14. I want to change the start date to May 27 but leave > the end date alone. If I change the s...

email access in outlook from a cruise ship
I'm going on a cruise to Alaska and I need to access my email to answer quotes, ( working vacation ) thanks. -- doug blair doug blair wrote: > I'm going on a cruise to Alaska and I need to access my email to answer > quotes, ( working vacation ) thanks. > > > > i don't quote understand what you mean. if your cruise ship gives you access to the Internet, you should be able to use Outlook. Check with your mail provider to see if what kind of web access they = offer. This isn't an Outlook issue per se.=20 --=20 Sue Mosher, Outlook MVP Author of ...

Multiple If True Values?
Does anyone know of a way to check for a value in two different cells, and if a certain combination of values exists, change the format of another cell? Any help would be much appreciated. Thank You. Start by experimenting with Format|Conditional Formatting Then come back if more help is needed best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Lee" <Lee@discussions.microsoft.com> wrote in message news:07DC594F-6045-4A81-B8B9-19F295A2AAA5@microsoft.com... > Does anyone know of a way to check for a value in two different cells, and &g...

Stored Procedure with array of values
I have the query below in a stored procedure in MS SQL 2005 server. My problem is that I would like to be able to pass in multiple questionID values. So I would like to replace A.QuestionID = @QuestionNumber with a method where I can pass in a list of question numbers. For example instead of passing in 286 I would like to pass in 286, 289, 412, and 513. The number of values passed in would vary from 1 to 15 or 20. I imagine the line A.QuestionID = @QuestionNumber would be edited to something along the lines of A.QuestionID IN ( @QuestionNumber ) SELECT Coun...

Too Many Excel Apps running
I recently installed Excel 2010. My operating system is XP Pro. Ever since I installed Excel 2010 I find that every time I open an Excel file it opens a new Excel. It is not unusual for me to have 5 different Excels open even after I close a file. My bottom ribbon is full of Excels! I previously used Excel 2003 and did not have this problem. I know these are different Excels operating because I am unable to open a split window to show two different files. Note - I usually open my files via Explorer. Is there a setting that I can use to require that my single open Excel can open any new Exce...

Excel document changes format
Hi, I have an Excel document that changes format unexpectedly. It seems to change the format of the document eventhough i saved it. I have to resize the windows of the bar graphs, etc. It just doesn't save it the way i want. I re-installed MSOffice and re-did the NT profile, but still persists. Any ideas? Thanks. Excel does seem to have problems if the screen zoom is anything othe than 100%. Usually changing to 100 and back resets he screen display -- Message posted from http://www.ExcelForum.com ...

Multiple mfc activex controls in one dll
In VS6, there was a possibility to define up to 4 controls, when creating a new activex project. No such possibility in VS2005. Is there any way in 2005 to add an addtional one to an existing MFC ActiveX project? Any pointers will be appreciated! ...

pulling cell "value"
in the cell C4 i have the formula =now() and I have that cell formatted to custom mmmm so that it displays as January. I am now trying to write some VBA code to look at cell C4 and take the January and then do a vlookup on the array that i have named months. months is the cells D14:E25 column D has a list of the months and column E has a list of numbers that corresponds to these months. This is a custom list so I can not use the standard numbers that excel uses for the months. The vlookup in vba should take the January and find the number in col E that corresponds to it th...

VFW webcam
Hi, I'm using Video For Windows to capture images from creative webcam in my application. This is giving me image in size 640x480. However, i need image in landscape resolution where width is less than height. I tried to squeeze the captured image but its distorting it badly. Any ideas how can we capture images from webcam in desired resolution? Thanks, neo see the amcap sample in DirectShow SDK -- Regards Sheng Jiang Microsoft Most Valuable Professional in Visual C++ http://www.jiangsheng.net http://blog.joycode.com/jiangsheng/ <dhapola@yahoo.com> ???? news:1160125564.284431....

Like numbers in a field
I am working with a 25,000 row parts issue listing that was created by parts issue date. There are many repeat numbers in the part number column as the same part would have been issued on several different dates. I would like to be able to combine the like part numbers to know how many parts were issued over the course of all of the dates. Any ideas??? The Column headers are Part Number, Quantity, Unit Price, Total Price and Transaction Date. Create a new query based on your parts issue listiong table. Drag the Part number field into the query grid twice. Click on the Total...

Does anyone use "location" field in Outlook?
After all these years, I just noticed when I go to make an appointment in Outlook (2003version, with BCM), that there's a second field after "subject" which would seem to be the one everbody mostly uses. The appointment fields are: 1. SUBJECT: (example: "Conference call with Joe and Mary) 2. LOCATION: (does anyone use this?) Is the idea to put something like "Annapolis, MD" meaning maybe a meeting there or something? I know it's a hokey question, but wondered about some examples of how other people are using it. Thanks, G Standard following us...

Getting Combo boxes to change options based on other Combo boxes.
Using Excel 2007. I am trying to create either Form Control Combo Boxes or ActiveX Combo Boxes that will change the selectable options based on selections made in previous combo boxes. I am having a hard time finding any information that will work for me. Can someone tell me how to make 5 combo boxes change available listed options when specific options are selected in another combo box? Please? I've been working on this for a very long time without success. I've tried using Data Validation, but my formulas are too long for all the different possible combinations. You are...

how to define scroll bar's page size value?
Hi all, I have a confusion about calculating scroll bar's page size. In my application, I am drawing an image according to scroll bar position. m_iGeneratedImgWidth - Width size of the image (this value is always bigger) rect.right - Width of the drawing area. how to define scroll bar's page size value? SCROLLINFO info; info.cbSize = sizeof(SCROLLINFO); info.fMask = SIF_RANGE|SIF_PAGE|SIF_POS; info.nPos = 0; info.nMin = 0; info.nMax = m_iGeneratedImgWidth - rect.right; info.nPage = ? In my OnHScrollBar() function, for SB_PAGELEFT / SB_PAG...

Empty From: field
Hi. We use a exchange 2003 server and I have notice that my outlook 2003 client behaves strange if the From tag in the header looks like this; From: �� <sender@domain.com> I�ve hooked up Thunderbird and it shows the From field as I think it should, instead of a blank from field it shows sender@domain.com If the header looks like this; From: sender@domain.com or like this; From: �name� <sender@domain.com> it works just fine. The problem is the first example� Any ideas? Cheers Jonas Jonas <barre@gargamel.nu> wrote: > We use a exchange 2003 server and I have notice th...

change font size of first character
I have a template that allows users to print business cards. It displays a form where they enter their name and three other lines of text. I would like to increase the font size of the first character in each word if the user enters the text in upper case. The code I'm using to capture the text from the form is: With ActiveDocument For intLoop1 = 1 To 10 .Bookmarks("Name" & Right("0" & intLoop1, 2)).Range.InsertBefore txtName .Bookmarks("Title" & Right("0" & intLoop1, 2) & "a").Range.InsertBef...

Insatantiate Generic Collection with Initial Values?
You know how you can instantiate an array of, say, strings and specify intial values at the same time with something like: string[] myStrings = new string[3] { "value1", "value2", "value3" }; Can the same type of thing be done for a List<string> object? I've done a lot of web searching but I can't find any sample code that illustrates this. Joe Cool wrote: > You know how you can instantiate an array of, say, strings and specify > intial values at the same time with something like: > > string[] myStrings = new string[3] {...

change the color of non-printing characters in this version of Word?
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) How does one change the color of non-printing characters in Word 2008 12.2.3 for Mac?? <br><br>In previous versions, the non-printing characters were greyed, in the new version they are blue and are a *huge* distraction. <br><br>Thanks You can turn the Off by clicking the "=C2=B6" to turn them on click it ag= ain. KW@officeformac.com wrote: > Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) How does > one change the color of non-printing characters in Word 2008 12.2.3 fo...

How do I change the inverse colour in an Excel chart?
I want to have blue bars when the values are positive and yellow when they are negative. I have checked the box for "invert if negative" when choosing the colour in Format Data Series, but I still get blue for both. David, The concept described here should work: http://www.pdbook.com/index.php/excel/conditional_column_chart/ ---- Regards, John Mansfield http://www.pdbook.com "david_hutton.NO_SPAM" wrote: > I want to have blue bars when the values are positive and yellow when they > are negative. I have checked the box for "invert if negative" wh...

Sorting Spreadsheet with Merged Fields
I have a huge spreadsheet that currently fits comfortably on an 11 x 17" page making it difficult to work with and understand....just too big. I'd like to make the spreadsheet fit on an 8.5 x 11" (landscape) page by stacking fields. This is marketing pursuit data so most fields hold text. When I stack the fields some fields must be merged. So far...not tough....I have a beautiful spreadsheet with all the data in a convenient format, easy to understand. The problem is sorting the first field (priority) per field grouping....can't sort because of merged fields. I t...

in MS EXCLE how we can protect only one cell?
plz do repl me soon Hi First select all of the cells in the Sheet>Format>Cells>Protection>remove the check mark form Locked. Next select the single cell you want to be locked>Format>Cells>protection>check Locked. Tools>Protection>Protect Sheet (optionally provide a password - remember to write it down somewhere of you do) -- Regards Roger Govier anu khan wrote: > plz do repl me soon EXCEL 2007 This assumes that you wish to protect cells D 83 to D 85. If you wish to protect just one cell replace D 83 to D 85 (below) with the cell ...

how do you chang language in excel
I have a swedish version of office 2003 it is in swedish but i speak english, can anyone tell me how to change it to english, other than having to go out and buy the english version. "peter curran" <petercurran17@eircom.net> wrote >I have a swedish version of office 2003 it is in swedish but i speak > english, can anyone tell me how to change it to english, other than having > to go out and buy the english version. That's a good way. In fact, it's the only way. -- Bob http://www.kanyak.com ...

Lists
I have a user who is importing an excel spreadsheet into a Sharepoint List, but some of the column types that SP is selecting is incorrect. I can't find any place to change the type of these columns (like from text to text with link, etc). Is this possible? Yes, you can change the column type after importing. Just go to the list settings page and choose the column you would like to update. The very first section of the column settings page will be for the data type of the column. -RH "J. Belcher" wrote: > I have a user who is importing an excel sprea...

Linking Outlook fields from the "Contact Folder" to a custom form in Outlook...
Using Exchange Server 2003/Outlook 2003, we have created a custom Help Desk form in Outlook. We would like the ability to link specific fields from the Contacts Folder (Example B), in a drop-down list box if possible. We are far from knowing that something like this is even possible. Would appreciate *any* suggestions. Thank you. ...

Can my form fill in a field, yet allow me to override?
Each customers is sent to us from a salesman, and we provide service for 1-7 days before the activity ends. A new charge is generated for each day of service. Employee #1 uses the customer service form to generate a bill, and includes the name of the salesman. Employee #2 uses the form to generate a bill on the next day, and has to look up the first bill, in order to know which salesman to record. The same thing happens every day until the activity ends. With each new referral for service, there's a strong chance it will be due to a different salesman, so the customer number an...