Page 3 of 3 FirstFirst 123
Results 31 to 40 of 40
  1. #31
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    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

  2. #32
    WithoutPause is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    62
    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.

  3. #33
    WithoutPause is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    62
    Quote Originally Posted by ItsMe View Post
    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
    Will check after class.

  4. #34
    WithoutPause is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    62
    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.

  5. #35
    WithoutPause is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    62
    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.
    Attached Files Attached Files

  6. #36
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    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.

  7. #37
    WithoutPause is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    62
    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.

  8. #38
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    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.

  9. #39
    WithoutPause is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Nov 2013
    Posts
    62
    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.
    Attached Files Attached Files

  10. #40
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    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.

Page 3 of 3 FirstFirst 123
Please reply to this thread with any new information or opinions.

Similar Threads

  1. passing values from form to query
    By gregd in forum Access
    Replies: 6
    Last Post: 05-02-2013, 03:18 PM
  2. Replies: 5
    Last Post: 10-15-2012, 12:18 AM
  3. Passing Multiple selection values to a report
    By techexpressinc in forum Forms
    Replies: 7
    Last Post: 01-13-2012, 02:27 PM
  4. Replies: 1
    Last Post: 03-24-2010, 08:42 AM
  5. Replies: 3
    Last Post: 06-02-2009, 09:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums