Record insert/delete anomaly - excel

I have the next problem to which I need help to solve.
There is a Workbook with three forms and a Database in Access.
There is a table in the DB called tblPlanungStatus where I record if a module is ready.
All three forms uses the table to either delete or insert a status into it.
There is an anomaly that occurs most of the time from Form3.
I insert the status, it runs without error. I run a query to count the recorords for this type and it comes back 1. Wich is good.
In the DB nothing happens, it shows no record added.
I run the query again and it says there is 1 record.
I run delete and the count says 0. So it seems to work. But in the DB still nothing.
I close the Workbook and run the count again and the record dissapeared, in the DB nothing shows.
If the record stays in the DB then when deleting it works, but after closing it comes back again.
Sometimes the record cannot be added, sometimes it cannot be deleted and when reopening the Workbook (which I don't know why matters) the record either deletes or adds.
In the DB the record appears and dissapears with a certain time, but not always.
I have been stuggling with this for over a week. Can anyone help me?
Thanks, Mike

Probably your Access database corrupted. Check this, especially "Number of records varies, depending how the data is sorted"

Related

Is there a way to use an IF statement to track if another user changed the data in a table and time stamp it?

I have an access database in which multiple customers will be placing large orders on a weekly basis. I have a query automatically set up in excel to refresh the information every minute. A potential issue I could see happening: Manager places order in our access form, decides to edit his record later w/o contacting the scheduler, and changes the order information he originally entered. I would like to track what it was changed from and to, as well as the date they changed it. These orders have to be placed by a certain time in the week for them to make the shipment in or out the following Monday. If orders are changed, I want to know. If orders are changed after the deadline, I especially want to know. Thanks
Create a before update event that inserts the changes into an audit log table. Here is the resource I used for my databases: https://www.techrepublic.com/article/a-simple-solution-for-tracking-changes-to-access-data/
Note: This will only track changes made to existing records through the form. It also will not track deletions or changes made directly in the table.

Access Subform Datasheet Only Returning 1 Result

I know this question has been asked multiple times in some form or fashion, but I'm not been able to find a solution that works and it's driving me crazy. I'm creating a search form in Access that executes a select query via VBA to find data that is in a table. So far this has been pretty straight forward, the query works, and the form returns results. The issue is that I'm using a subform to return/display the results and it is only returning one result at a time.
I used the setup wizard to add the subform to the main form and I linked the two forms during that process. I have the subform being displayed as a datasheet, but even if I change it to a "continuous form" it still just returns one record at a time. I have my subform's Record Source set as my Select query (Select * From tbl_Search) , and I've set the Record Source for my main form to just about anything I can think of (Select query, table, nothing...).
I know there has to be a way to return all the records in one datasheet without having to continuously click the next arrow, but I have yet to figure out what that way is.
Since this isn't an issue with the code per se, I wasn't sure what kind of images or code blocks might be necessary to answer this question, so i tried to be as descriptive as possible. If there is a chunk of code or screenshot that you need to help answer this question, just let me know.
Your main form should be unbound. Create a search query and set it as the subform's recordsource. You can pass the main form's fields as parameters to the query, for example:
PARAMETERS [Forms]![YourMainForm]![YourTextField] Text (255);
SELECT *
FROM YourTableName
WHERE ((([FieldName)=[Forms]![YourMainForm]![YourTextField]));
The only thing you have to do when running a search is to .Requery the subform.
Me.SubformName.Form.Requery

XPages: Inserting new row throws error javax.sql.rowset.spi.SyncProviderException: 1 conflicts while synchronizing

I am getting an error while trying to insert a new record to a SQL table using the following code.
jdbcRowSet1.saveRow(objectData);
jdbcRowSet1.acceptChanges();
The issue is because of a trigger that fires after INSERT that tries to set a primary key value (Column name ID) with an auto generated ID (Column name ID_AUTO). Both columns are in the same table. If that trigger is deleted, the code works just fine.
Is there anything that can be done to the xpages code to avoid the error (The error says "1 conflicts while synchronizing"). The error happens at the acceptChanges() line.
EDITED:
I took care of the above mentioned issue. But now my next issue is getting the auto generated ID value back after inserting the new row. Please let me know if anybody knows.

Record Display won't update after ComboBox selection

We're using an Access Application that presents a ComboBox built off of a query that polls a Sharepoint list, then shows the details for that record when clicked.
It's worked perfectly for seven months or so, but today, one of the users ran into an issue when trying to add a new record to the List. After the ComboBox would update with the new entry, clicking on it would not update the display of that record. The highlight in the ComboBox would move, but the details would still reflect the last record chosen.
Thankfully (?) I can re-create the issue on my copy of the client application, so I can troubleshoot it and also prove that it's a repeatable issue, not just a sporadic bug.
Here's what I've got so far:
Restarting the affected form allowed normal operation to continue, but while that's an acceptable workaround, it's obviously not an acceptable solution.
Editing existing records does not trigger the issue. The edited records display perfectly.
None of the fields in the problem List are 'required'.
The Sharepoint List in question has about 1700 records, so it's not a large database at all, and on top of that, the ComboBox is only displaying a Query that returns 30-50 records.
Made a test form that recreated a similar environment for one of the other Sharepoint lists in the DB and got the same response... or... lack of response.... from the ComboBox after adding a new record.
VB Calculations do not appear to be affected and can use the new records in formulae, despite heavy usage of Recordsets to compile those values.
Any advice will be most welcome!
This looks simply like the form is not refreshing the values, try pressing F9 (ReCalc) or F5 (ReQuery) and see if the value updates. There is a bug on access forms where going back from a new record and then forward again seems to stop recalculation - this seemed to fix it for me:-
Private Sub Form_Current()
Me.Recalc
End Sub

J2ME Record Store delete then insert Exception

I am working on J2ME Record Stores and when i delete the contents successfully, and then i check it, it gives me the correct count which is zero. But when i insert again, it gives me error finding record exception, because it is inserting after the content that i had inserted before. It is inserting from 2 instead of 1.
Can anyone explain why is it happening that way?
The record id in a recordstore is unique and auto-incrementing, just like a primary key in an SQL database. When 1 has been used, it cannot be used again. (Unless you delete the recordstore and create it again).

Resources