Solved

Microsoft access error 3426 when trying to read a previous record

Posted on 2014-03-17
6
231 Views
Last Modified: 2014-03-27
Good evening,
In Microsoft Access, I have a subform that I use to record transactions, my goal is that before to update a new record, I want to look in a field named “NomProduit” to see if the description if beginning with WJ- if it does, then use the selling price 2 (PrixVente2) if it begin by anything else, then use the selling price 1 (PrixVente1) it seems an easy request, but I received an error 3426 This Action was Cancelled by an Associated Object.(3426)" and when I click on Debut, it brings me on the line .MoveLast

Any idea on how I can achieve this task, I attach an image that worth a thousand words!

Thanks everyone
Claude
erreur3426.docx
0
Comment
Question by:supportAutoCaisse
  • 3
  • 2
6 Comments
 
LVL 36

Expert Comment

by:PatHartman
ID: 39936982
I don't understand why the previous record has anything to do with the current record.  Keep in mind that "previous" is a nebulous term when working with relational databases.  Tables and queries are unordered sets of data and unless you have a specific sort in place that orders by a unique identifier, you can never be sure what record is the "previous" one.  If you find that one record is dependent on the value of a sibling, you may want to rethink your design.  Common data elements should be moved to the "parent" table.  If you don't currently have one, you may need to make one.
0
 

Author Comment

by:supportAutoCaisse
ID: 39937842
Well, that was not very helpful, why the previous record has anything to do with the current record is not hard to understand with the document I joined, if the previous record field name NomProduit begins with WJ- then do this if not do that. I hope you follow up to now.

I am going to stop that subscription that is only good to me to take 19,95 from by bank account, free site gives more accurate answer... go see Microsoft forum it might help you.
0
 
LVL 36

Expert Comment

by:PatHartman
ID: 39939741
Are you the only person doing data entry or is this a multi-user application?  

Is "last" the last record you entered or the last record anyone entered?

What do you expect to happen if the recordset is empty?

Does the error happen every time the event is triggered or only in some situations?
0
 

Accepted Solution

by:
supportAutoCaisse earned 0 total points
ID: 39941373
I will close this subject because I found the solution, first, I had to create a field on the main form and everytime a product is sold, the name is going on that field, then, with an if and else statement it was easy to achieve my goal.

Thanks anyway for your time
0
 

Author Closing Comment

by:supportAutoCaisse
ID: 39958384
Because I did find the soluntion
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question