Solved

Microsoft access error 3426 when trying to read a previous record

Posted on 2014-03-17
6
222 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 34

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 34

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now