John- No, field1 doesn't always have an Offer value. It's only needed in Orders. Normally (99% of cases) it remains blank and it's assigned a value only when the Offer is accepted by the Customer and the Offer is proceeded to an Order. But I came to a solution: I put the following code in the start of the segment and I got it right:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 The only thing left to do is to make the current record be deleted without getting any messages. How would I? Theodore --- In [email protected], "John Viescas" <[EMAIL PROTECTED]> wrote: > Theodore- > > I don't understand what you mean by "when field1 value is already there I > get no trouble." Is "field1" a value saved in tblOffers? If the field is > missing in an Offer, you must set it *and save the record* before running > your code. Perhaps you need: > > ' Check to see record is saved > If Me.Dirty Then > ' Nope, save it > Me.Dirty = False > End If > > .. before all your other code. > > You can throw away the confirmation for a delete in the form's > BeforeDelConfirm event. > > John Viescas, author > "Building Microsoft Access Applications" > "Microsoft Office Access 2003 Inside Out" > "Running Microsoft Access 2000" > "SQL Queries for Mere Mortals" > http://www.viescas.com/ > > > -----Original Message----- > > From: [email protected] > > [mailto:[EMAIL PROTECTED] On Behalf Of tyki9799 > > Sent: Thursday, June 23, 2005 11:15 AM > > To: [email protected] > > Subject: [ms_access] Re: Moving records between tables > > > > > > Hi John. I do just that. I go to an existing offer (in frmOffers), > > modify/add some data. I have a field field1 that is Required in Orders > > but not Required in Offers. So when in frmOffers I give it a value > > through a combobox. Then I hit the "Turn Offer to Order" button so it > > will run all the code you helped me to do. Then I get a message that > > field1 is required to proceed. In the other case, when field1 value is > > already there I get no trouble. > > > > Another thing that troubles me is what code to write so I would delete > > the current offer without getting a message. > > > > You're really proved quite patient with me!!! > > > > Cheers, > > > > Theodore > > > > --- In [email protected], "John Viescas" <[EMAIL PROTECTED]> wrote: > > > Theodore- > > > > > > Don't you have a form to edit Offers and Offer Details? Modify the > > offer > > > first, then do the copy. If you already have the offer displayed, > > change > > > and save it before copying it. > > > > > > John Viescas, author > > > "Building Microsoft Access Applications" > > > "Microsoft Office Access 2003 Inside Out" > > > "Running Microsoft Access 2000" > > > "SQL Queries for Mere Mortals" > > > http://www.viescas.com/ > > > > > > > -----Original Message----- > > > > From: [email protected] > > > > [mailto:[EMAIL PROTECTED] On Behalf Of tyki9799 > > > > Sent: Thursday, June 23, 2005 9:36 AM > > > > To: [email protected] > > > > Subject: [ms_access] Re: Moving records between tables > > > > > > > > > > > > I see. What could I do if change some data on the current record > > > > (current Offer) before I amend it to an Order so I would > > pass the new > > > > data to the Order? That is, how do I update the current > > Offer record > > > > before make it an Order? > > > > > > > > Theodore > > > > > > > > > > > > > > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ms_access/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
