Results 1 to 5 of 5
  1. #1
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194

    Problem with duplicate record button


    I've attached a sample of my database that has the problematic button. If you open it and go to frm_itemmaster and search 'test' it'll bring up the test record. I set a button called 'item change' to duplicate the current record so that the user can make changes. I created the button using the wizard. I'm not sure why, but I keep getting error 'recordsgotonew' isn't available. I've double checked that the query is updateable and that you can add records. So far I've checked the following attributes: Allow Additions (Y/N-tried both), Data Entry (Y/N-tried both), Record Locks (No Locks). When Data Entry is set to YES, I can no longer filter records. So hopefully that isn't the answer. Can anyone tell me what I'm doing wrong?
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Why form/subform? Why not the subform as a standalone with buttons in form header section? What I did:

    1. cut/paste buttons to header section of subform

    2. remove dynamic filter from query (I never use them)

    3. set RecordSelector property to yes

    4. change the ControlSource and Name properties of Item No textbox to just Item No

    5. open the subform as independent form

    6. run the Item Change code


    Advise no spaces nor punctuation/special characters (underscore only exception) in naming convention. Better would be: ItemNo or Item_No, IsEmbossed or Is_Embossed, Temp_Cel, NonGMO_Just
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    Thank you June7. I wasn't sure why I couldn't filter anymore but I added the dynamic filter back to the query and everything works as expected. Thanks again!
    Last edited by lccrews; 10-11-2017 at 12:20 PM. Reason: answered my own question

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    I would apply criteria to form Filter property. Put the dynamic parameter back if you prefer. Since you use wildcard to pull in all fields, don't want field to display twice so set the second Item No reference used for the filter to not display - uncheck the Show box - and reference the now standalone subform. So first delete the main form and rename the subform.

    This copy/paste approach allows duplicate Item No - is that appropriate?

    Suggest a combobox for selecting the Item No with RowSource: SELECT [Item No] FROM tbl_ItemMaster;

    Can have code in Item No AfterUpdate event instead of a button Click. Use button if you want to offer multi-criteria search capability.

    Also, instead of RecordSource reference to a query object, could have SQL statement there.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    lccrews is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Aug 2017
    Location
    Los Angeles
    Posts
    194
    June7 as always you are a wealth of knowledge. Thank you again. I do take notes from you.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 03-16-2016, 05:47 AM
  2. PO Detail Subform Line Numbering Problem
    By ChrisThomas99 in forum Programming
    Replies: 4
    Last Post: 02-05-2013, 04:31 PM
  3. How to create plenty of columns in a report
    By petrak in forum Reports
    Replies: 1
    Last Post: 09-23-2011, 01:16 AM
  4. Master/detail form problem....
    By dkperez in forum Forms
    Replies: 5
    Last Post: 04-01-2011, 04:28 PM
  5. Report Detail Entry Selection Problem
    By Joe in forum Reports
    Replies: 0
    Last Post: 02-02-2009, 06:55 PM

Tags for this Thread

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