Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Microsoft access error 3426 when trying to read a previous record

Posted on 2014-03-17
6
Medium Priority
?
240 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 40

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 40

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

885 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