Results 1 to 3 of 3
  1. #1
    Rramjet is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    36

    Using Macros, can I, from Form 1, Copy field > Form 2, then paste field (into combo)?

    Hi again...

    Form 1 is used to create a new record, form 2 is used to display existing summary information associated with that record
    drawn from a CLIENT table.



    Using Macros I want to copy the ID from form 1 new record, close form 1, open form two, and paste the ID into the ID field (which, I have just realised - is in fact is a combo box - so it should automatically display the summary information for that client once the ID is pasted in....shouldn't it?)

    Can this be done within the macro structure?

  2. #2
    Rramjet is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    36
    Okay - I can use SetValue and it can do the job if I select the right parameters - but it does not like pasting into the combo box and throws up an error (value cannot be set) and stops the Macro...

    Well that's fine because I can use WarningOn = No to get rid of the error dialogue - but it still brings up the stopped macro dialogue ([Research_Id], [Research_Id]=[Research_Id]) is not good apparently... but it does precisely what I hoped it would do and this is the final macro step - so it will stop anyway... what can I do to force the macro to finish despite it thinking it has failed (when for my purposes it has definitely worked precisely as i need...)?

  3. #3
    Rramjet is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2013
    Posts
    36
    ...Actually, I think this works BECAUSE the macro cannot complete. It pastes the ID value in, but does not "set" ID the value. This allows the combo to recognise the ID but not change the record (and so it does what it is meant to and displays the information associated with that ID). Amazing what can be done when you know nothing... I can live with the macro error dialogue (unless someone knows of a way to stop the macro a thtat point without seeing the dialogue - but when I tried it completed the macro and changed the record...) - so I guess I'll just tell the users to imagine it is a normal "Do you want to accept this..." type dialogue.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-13-2012, 02:11 PM
  2. Replies: 5
    Last Post: 02-21-2012, 07:33 AM
  3. Replies: 3
    Last Post: 05-23-2011, 07:29 AM
  4. Copy field from form to another field in same form
    By anandram in forum Programming
    Replies: 8
    Last Post: 05-08-2011, 02:49 PM
  5. Copy form field to another table
    By Dega in forum Forms
    Replies: 6
    Last Post: 05-21-2010, 02:57 PM

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