I think in order for you to split the array you will need to store it in a Variant.
So
Dim strOpenArgs() As String
would be
Dim strOpenArgs As Variant
I think in order for you to split the array you will need to store it in a Variant.
So
Dim strOpenArgs() As String
would be
Dim strOpenArgs As Variant
http://www.matthewshanebrown.com/me/Noupdate.zip
It's just above the limit for here even zipped. You will need to login. User is msb with a password of 001. You want to log on, create new, Complaint, and after adding in some data click on Fact Sheet. Add in data there. You can go to existing records to see if the data in the Fact Sheet is there or check the table. Adding stuff into the complaint table initially isn't the issue. It is when you add in stuff via the initial Fact Sheet that the data isn't being updated. Updating the Fact Sheet data seems to work fine once you access it via the existing record area.
As Variant didn't work. I tried to download the copy I put up and got an error. I'll put in a link that worked for me.
https://www.dropbox.com/s/kbdd6c5c0lsw5a2/Noupdate.zip
Restating the steps needed to replicate my issue.
Login: msb
Password: 001
Log in.
Click on New Record and then Complaint.
Fill in the Grievance Number(needs to be 7 digits) and any other data you feel like.
Click on Fact Sheet.
Enter data in the enabled fields.
Click Home.
Click on Existing Record.
Click on Complaint.
Fill in the Grievance Number you previously inserted.
Click on Fact Sheet.
Notice the Fact Sheet data that you entered in is missing.
Added new smaller file so I could attach it. Open and enter data into the frmComplaint form and then click on Fact Sheet. Enter data there and then check to see if the table updated as well.
Your open args are working. The controls are being populated with values from the open args. All of that is working fine.
When you open frmFactSheet using the Docmd from the previous form, you are not specifing to go to a new record. So the record you are updating is the first record in the recordset. You could have your Docmd create a new record and this way you will pass the oprn args to a new record, appending the table. However, both forms are bound to the same table. frmFactSheet is not looking at anything the previous form does not have access to already. Additionally, your DB "appears" to not be working because your open args is duplicating a key value that does not allow for duplicates.
I tried having the data from the previous form go to unbound data, but that didn't seem to work either. It should allow edits without using acFormEdit, but I tried that as well. If I tried to pass the data to the Fact Sheet via a select/filter it said it couldn't find the record. I can do a search for a record and then update it in a different form but that code doesn't work for this. I try matching the DataEntry, Allow Edits, etc. fields to be the same in both cases and yet the data doesn't update. Is there some sort of specific timing I would need to pass the data via a where statement and then simply do a filter statement in the second form? Again, I tried and came away with a record not found.
Perhaps starting over and describing what it is you are trying to accomplish with this task, from a business perspective. There is a fundamental problem with copying so many fields and then inserting them somewhere, even if it is inserting into a new table. You should not be duplicating data. That is what primary keys are for. Store the PK value in a foreign key field.
I am essentially recreating paper forms into electronic versions. This will make it easier for the end user to enter in data since it will mimic what they know. In the case of the Fact Sheet, it is a multipage document that displays some data that was previously entered in. I guess the thing that I'm stuck on is why is the initial Fact Sheet in this case not updating and yet the Fact Sheet from a returned search does update. The data is there for both including the key field.
There should not be a need to hold values in memory from the original form and carry them over to the Fact Sheet form. Simply save any new records in the original form and then view the data in the Fact Sheet. I do not see any purpose for the fact sheet other than to view the data. This form should not be used as data entry.
You can use the following VBA to save the current record.
If Me.Dirty = True then
Me.Dirty = False
End if
Closing a form saves the record
Navigating to the "Next" record saves the record.