Solved

Microsoft access error 3426 when trying to read a previous record

Posted on 2014-03-17
6
228 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 35

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 35

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

785 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