write conflicts

i have a form with a command button that opens another form; both have the 
same table as part of their record source.  So, to avoid write conflicts, I 
close the current form before openng the new one (see code below).
The problem is that I've tried several approaches that I thought would work, 
but I'm still getting a Write Conflict error

Oddly, wheni close the second form, an reopen the first (with similar 
code...) I do not get the error

Any suggestions would be GREATLY appreciated
thanks in advance


Private Sub cmdFixtureSchedulePrintOptions_Click()
On Error GoTo Err_cmdFixtureSchedulePrintOptions_Click

'    With Me.Form.RecordsetClone
'       .Edit
'       .Update
'       .Bookmark = .LastModified
'       Me.Form.Bookmark = .Bookmark
'    End With
'    DoCmd.Close
'----------------------------------------------    didn't work

'    DoCmd.RunCommand acCmdSaveRecord
'    DoCmd.Close
'----------------------------------------------     didn't work

'    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
'    DoCmd.Close
'----------------------------------------------     didn't work

'    With Me.Recordset
'       .Edit
'       .Update
'       .Bookmark = .LastModified
'       Me.Form.Bookmark = .Bookmark
'    End With
'    DoCmd.Close
'----------------------------------------------     didn't work

    stDocName = "frmFixtureSchedulePrintOptions"
    DoCmd.OpenForm stDocName, acNormal

2/24/2010 11:23:45 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 37

hi Mark,

On 25.02.2010 00:23, Mark Kubicki wrote:
> i have a form with a command button that opens another form; both have the
> same table as part of their record source.  So, to avoid write conflicts, I
> close the current form before openng the new one (see code below).
Can you post a concise and complete example?

> '    With Me.Form.RecordsetClone
> '       .Edit
> '       .Update
> '       .Bookmark = .LastModified
> '       Me.Form.Bookmark = .Bookmark
> '    End With
> '    DoCmd.Close
What do you like to achieve with this piece of code?

--> stefan <--
3/1/2010 9:45:07 AM

Similar Artilces:

problem writing AVI file
I am writing AVI files, following the Microsoft writeavi.c sample program. Works fine, except for one annoying issue: After opening the AVI file with AVIFileOpen, I create an AVI stream with AVIFileCreateStream. Here you have to pass an AVISTREAMINFO structure, in which you specify, among other thigs the fccType and the fccHandler. But the handler is not known yet, so I set it to zero, as in the MS sample code. Then I call AVISaveOptions, to let the user choose a compressor. After that call, the fccHandler can be found in the AVICOMPRESSOPTIONS structure, but it is too late!!! Note that AVIS...

How to write a trigger that updates a column in each row of an update set?
An issue I've ran into before but never really got a handle on is how to set up a trigger (sql 2005) so that a column value is updated as appropriate for each row, when making a bulk update? In my attempt at DDL below, the idea would be that when new data is updated or inserted into Table_1, the value of column MyValue would be copied into column MyValueCopy. If I use the inserted table to set MyValueCopy for a single row, MyValueCopy is updated as I'd expect. If I update MyValue for all rows, MyValueCopy for all rows end up with the MyValue value of the last record. ...

Write a sum formula to determine the total of all the numbers bel
how can i do the the work to havee to do The formula to sum all the numbers is =SUM(A1:IV65536) -- David Biddulph "cristian" <cristian@discussions.microsoft.com> wrote in message news:282443DB-841A-44FF-A239-6E3AD25BD5A6@microsoft.com... > how can i do the the work to havee to do One way to get the work done is provide more detail in the body of your message. Your subject line reads only............ "Write a sum formula to determine the total of all the numbers bel" The formula to sum all numbers in column A below 46 is =SUMIF(A1:A1...

Web.Extensions 3.5 conflicts with 1.0.61025
I have a Webapp which was developed for framework v2.0/lower, it references System.Web.Extentions 1.0.61025.0 I installed .net 3.5 on that box and the working webapp starts failing with the below error: error CS0433: The type 'System.Web.Script.Services.ScriptMethodAttribute' exists in both 'c: \WINDOWS\assembly\GAC_MSIL\System.Web.Extensions \1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c: \WINDOWS\assembly\GAC_MSIL\System.Web.Extensions \\System.Web.Extensions.dll' There is no where System.Web.Extensions 3.5 is re...

Writing attributes
Hi, I've created a routine that reads from my sql server and outputs the contents to an XML file. I have two problems. Firstly, if an error occurs (i.e. the user doesn't supply the correct parameters for the stored procedure), I get an error when they correct their mistake saying that the file is already in use. I did try having... Dim writer As New System.Xml.XmlTextWriter(Server.MapPath("getmsgs.xml"), System.Text.Encoding.UTF8) Try writer.Formatting = System.Xml.Formatting.Indented SqlConnection1.Open() sqlNVMGetMsgs.Parameters("@distUID").Value = Reques...

write notes to a cell
Can I write a note to a cell that already has an alternate function -- Message posted from http://www.ExcelForum.com Or Not -- Message posted from http://www.ExcelForum.com OK... I'm not sure if this is what you're looking for... but have yo tried entering a comment? Rightclick the cell, Click on "Insert Comment" Then type whatever you want the note to read. After that, all you have to do to read the note is to hover your curso over the cell and a little box will appear displaying the information. HTH Jos -- Message posted from http://www.ExcelForum.com You are so...

Possible to write a macro to print all attachments with specific .
So here's the deal: I get emails daily with 6 to 12 word docs attached that are forms I need to review. They are four pages long, but when I print them, I choose the option to print four pages on one page so I only have to print one page for each doc for quick review. I would love it if a macro could basically print all of the attachments with the click of a button at the setting of four pages on one page. Possible? Not possible? Anyone willing to do it for a fee? (I am not a programmer) I failed to notice the "print attachments" option in the printer...

Can I re-write an outbound domain without exchange?
Our company recently migrated from a ".net" to a ".com" address. Is there a way to force all outbound messages from my 2003 outlook out box to use the ".com" even if the original sender used their ".net" address? For example, all users used to be "name@company.net", they are now "name @company.com". Can I create a rule or script to force the switch from ".net" to ".com" every time a message is sent to someone with domain "company"? Thanks Are you connecting to an Exchange server or no? -- Ka...

write Macro or DLL to copy data from worksheet to memory
Hi, I would like to write some functions in Macro or DLL so that I can copy some data from Excel sheet into memory so that I can call back from other Excel sheets or macros. It works as a global variable array, something like that. Thanks If you must use global variables... Option Explicit Dim myArr As Variant Sub loadMyArr() myArr = Range(Range("A1"), Range("A1").End(xlDown)) End Sub The above code puts the contents of the current region of A1 in the active sheet into the variable myArr. myArr will be a 2-D array that you can loop through with code such a...

writing an xml inside XmlReader or XPathDocument to a file.xml
I believe this should be pretty elementary, but for some reason I cannot seem to think of how to write the an XML file from an incoming XML file. Basically this is what I do: Input: XmlReader instance from another module (beyond my control) Operations: XPathDocument = new XPathDocument(XmlReader); Then translation using XslTransform and output into XML2.xml NOW THIS IS WHAT I WANT TO DO: How can I ALSO write the Incoming XmlReader to a file ? I need this to help debug issues with the incoming file. So in essence I want to be able to take an XmlReader or XPathDocument and write it...

Smartlists and Letter Writing Assistant
Is there any way to expand the Smartlist selections that are available to the Letter Writing Assistant? We'd like to pull in data from a Sales Smartlist that we created in SLBuilder but the only available choices in LWA are the Customer, Vendor and Employee folders. Out of the box, no. With a customization, probably no as well. I've looked at it a bit as it has come up before and I don't really see a way to hook into the LWA to get it to display from a custom list. Then of course to make smartlist use that is another story as well. Maybe i'll take another l...

how do i write my own xml schema for Excel?
I have simple xml data files that I want to open in Excel and I need to define the data field types as text and/or numerics. I'd like to attach a schema to the data that defines these types but I can't seem to get it to work. What would you write the schema in and what would be some simple examples to accomplish this? For example, xml tag names of <CustomerCode> is text and <Sales> is numeric and they are the only two tags in a file and they repeat. There's information on the Microsoft web site that may help you get started: http://msdn.microsoft.com/office...

Outlook 2002 frequently crashes while writing new message.
Random users have this problem on standard XP clients. I can't find anything on Technet, any suggestions? Thx, Peter I too am having this problem with Outlook on XP. Have you found out anything yet? >-----Original Message----- >Random users have this problem on standard XP clients. >I can't find anything on Technet, any suggestions? > >Thx, >Peter >. > ...

MS Project file can not open in Read/write mode
The user is trying to open their project in Read/Write mode, but this error message pops up. There are no projects to be Forced Checked In and no projects in the Queue for checkin. As administrator, I can open the project and check it back in, but even after doing this the user cannot open the project in read/write mode.I made sure that use has cleared cache for all checked out projects by her.any suggestion ? thanks in advance GP -- I would immediately suspect that this is a permissions issue. Is the user only a member of the Project Managers group? And have you made an...

MSCRM Opportunity's to allow price override and write in products
The Opportunity functionalirty should allow users to over-ride the price list values as per the quote functions. Additionally the option to have write-in products, again as per the Quotes functionality, should exist as part of the standard Opportunity functionality. This therefore gives the sales person flexibility is pricing the products to suit the client and also include products that are not standard price list items ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I...

I select "Mastering" format instead of of what Microsoft stubbornly calls "LiveFileFormat" (which is really UDF). The disk is written in a few minutes, fine. But check properties - it comes up as "UDF". I need CDFS/ISO true Mastering format, too long to explain why. I am not recording music/videos & oher rubbish. It's all technical file si.e. DATA. I tried everything but despite Mastering format, not LiveFileSystem selected, it all writes as UDF. Now here's a surprise. If you think Vista is mislabeling a mastered disk as UDF, when i...

Write to Access Via Excel
Is it possible to use Excel as a frontend to Access? I developed a database for one of the groups at my company, but the request was made to interface it to Excel, if possible. If it can be done, what are some of the pros and cons of this approach? Thanks! PJ I suppose you could do that, but why would anyone want to cripple their users that way? The real question, though, is what does Excel offer in terms of an interface, that would be superior to the interface in your Access database? George "PJFry" <PJFry@discussions.microsoft.com> wrote in message news:28A446D2-...

how to write data and string to a text file
I am very new to this. How do you write string and data to a file? For example, I want to write: "I am 28 years old" 28 is a calculated number from a function -- NewGuy10 ----------------------------------------------------------------------- NewGuy100's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2793 View this thread: http://www.excelforum.com/showthread.php?threadid=47490 Using VBA? Option Explicit Sub testme() Dim FileNum As Long Dim myYears As Long myYears = SomeFunction(DateSerial(2000, 12, 31)) FileNum = FreeFile ...

writing a vba code for a simple function
Hi I have just started using VBA from today and I am slowly getting the grasp of it. For the time being I am supposed to write a code to execute a certain function. Let me break down the scenario. I have a table with some names (which is linked to a different worksheet). if instead of the names, an error message comes up, I want to retrieve all the rows with the errors and transfer these messages to a different worksheet showing the errors. I was thinking about maybe using strings and conditional commands but since I just started using VBA I cant quite figure out the picture as to how t...

Writing and Reading into an Array
Sorry iam a novice but ineed your help guys... I have a text file having many 100 records having 8-15 fields sep by commas I have successfully created and been able to read an array storing CString My problem is i want to get the whole textfile situated in my hard disk into my Array Is it possible to write the whole text file into the Array,if yes how??else wat should be done Thank You "Novice" <anonymous@discussions.microsoft.com> wrote in message news:2C469A24-9069-40D3-B743-658BB360B314@microsoft.com... > Sorry iam a novice but ineed your help guys.... > > I ha...

Writing customizations for Dynamics GP
All: It used to be that when you wanted to do a customization for Dynamics, our partner would use dexterity. (maybe they still do) If someone wanted to learn this for themselves, what would everyone suggest I learn? Dexterity, or .Net (I have been hearing that this is being used now for customizations. Specifically I am looking at adding new inquiry windows, capturing more data (like extender) but not having new windows, etc. Just looking for suggestions on where to start Thanks! -- Doug Doug, There is merit in learning the two. Dexterity on one side, is STILL the developmen...

how to write arabic short Alif
Please tell me how to type the Arabic Short alif of Alif Qassira like teh one used in رٰجِعُونَ. IT is mainly used in teaching Arabic and in writin Quranic verses How to type it depends on the particular Arabic keyboard you have installed, but it is Unicode character 0670, so type 0670 on the regular keyboard and then Alt-X, and it should be entered. On Feb 4, 10:01=C2=A0am, mohammed T Shoukry <mohammedTShou...@discussions.microsoft.com> wrote: > Please tell me how to type the Arabic Short alif of Alif Qassira like teh= one > used in =D8=B1=D9=B0=D8=AC=D9=90=D8=B9=D9...

who to use fwrite to write through a hidden file
hi all~ now i try to use "fgets" and "fwrite" to read and modify a hidden file "boot.ini" code : file = fopen("C:\\"boot.ini", "rt"); while( fgets(data, 512, file) != NULL ) { content[row++].Format("%s", data); } fclose(file); if( content[row-1].Find( " /noguiboot /bootlogo" ) != -1 ) { content[row-1].Replace(" /noguiboot /bootlogo", ""); file = fopen("C:\\text.txt", "wt+"); int line = 0; while(line != row) { ** fwrite(content[line], sizeof(char), content[line].GetLen...

making charts with boxes to write in
Is there a question? - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Patsyspencer@sadie66762" <Patsyspencersadie66762@discussions.microsoft.com> wrote in message news:7CEFC048-A8E5-4D63-B050-7EAA723560AE@microsoft.com... > ...

Conflicting calendar updates
Exchange 5.5 all SP's and patches applied, Outlook 2000. I'm having trouble with two Administrative Assistants, Evelyn and Donna, trying to update a corporate calendar in a mailbox entitled Calendar - OIS. Larry is the Exchange Administrator. Evelyn is the default NT user on the account, Donna has User permissions in Exchange Administrator. We've also tried it without giving Donna User permissions in Exchange, just Editor permissions in Outlook, with the same results. Help? Desc: 1. Evelyn is an owner of an Outlook Calendar. 2. Larry is an owner of the same Outlook calendar. 3. D...