Shamil Salakhetdinov
shamil at users.mns.ru
Sun Mar 19 14:48:18 CST 2006
Rocky, This is MS Access, which does this trick. Good feature, thanks MS Access developers team! I remember when "young chicken" programmer/researcher I read an article about updatable joins and how to make a real DBMS supporting them(not easy stuff in a generic case) - just 20 years after I found that feature implemented in MS Access :) But be careful if you have any plans to upsize your app to MS SQL or other backend DBs - this trick/feature may stop working. And then the usual/standard way of first creating Job record and then using it in subform to define the link with Equipment record. I do it usually using popup form, which can be activated by double clicking on a combo-box of subform (it would be Job combobox in your case) and when the new data entered in the popup form and this form is closed then a message/call is done to subform to requery combo-box tho have new value(s) in it. > Thank you. My pleasure! > I think I'll take the rest of the day off now. Yes, that's a weekend - time to go swimming I guess there in California :) And I will go skiing tomorrow here - we have got some snow fall today - nice spring time weather, still good for everyday skiing! :) Shamil ----- Original Message ----- From: "Rocky Smolin - Beach Access Software" <bchacc at san.rr.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Sunday, March 19, 2006 10:28 PM Subject: Re: [AccessD] MAny-To-May > Shamil: > > Beautiful! I had the join query already set up as the record source of > the subform. All I needed to do was to drop the FK of the relation > table into the grid, add it as an invisible field on the subform (not > sure if that was really necessary) and viola! it worked. But it > probably would have taken me a month to figure it out. > > Thank you. I think I'll take the rest of the day off now. > > > With best regards, > > Rocky > > > Shamil Salakhetdinov wrote: >>> How does one work around this problem? >>> >> Rocky, >> >> This works in MS Access 2003: >> >> - create join query of relation table and Jobs >> - use this query as the recordsource of subform >> - use BOTH relation table's and job table's JobId field in this subform; >> - make this subform a datasheet form (not necessary - just to better see >> test results); >> - open main form in normal view; >> - enter new job information in subform's row and save it >> - watch how new autonumber Ids are assigned to relation table's row and >> to >> new job row. >> >> You can now hide autonumber IDs. >> >> Shamil >> <<< tail skipped>>>