Results 1 to 5 of 5
  1. #1
    hawzmolly is offline Advanced Beginner
    Windows 7 Access 2003
    Join Date
    Oct 2008
    Location
    Green Bay, WI
    Posts
    77

    Red face Back to original form

    I have a form (myform1) that takes data from an unbound comb box. I need to make an addition to the table from which the unbound combo box draws it's info and then be able to reopen the combo box to enter the new data.

    I have a Command Button that takes me to the data entry form (myform2) to update the combo box table.

    On the second form (myform2), after data entry, I have a Command Button that runs the following Macro:

    Macro
    Step 1 - Action = Close, Object type = Form, Object name = [my form2], Save = Yes

    Step 2 - Action = Close, Object type = [my form1], Save = No


    Step 3 - Form Name = myform1, View = Form, Filter is blank, Where Condition is blank, Data Mode = Add, Window Mode = Normal


    When I click of the Close button the system completes all the steps. However, I was expecting the return to my original form (myform1) in the same condition as when I left it but, I find that the data has been saved in both my original table as well as my revised table and a new blank original form (myform1) is happily waiting for me to add new stuff.



    What I need to do is get back to the original form in the same configuration as when I left it. Then I can continue to complete the form.

    I really thought I could do this using the macro. Please show me the error of my ways

    Thanx in advance.

  2. #2
    Icewolf0927 is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2010
    Posts
    13
    Try not closing the first form. I am thinking if you leave it open it should keep the information there.

  3. #3
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    Addition to ICEWOLF's suggestion,
    don't close form1, but add form1.requery to refresh the showing data.

  4. #4
    hawzmolly is offline Advanced Beginner
    Windows 7 Access 2003
    Join Date
    Oct 2008
    Location
    Green Bay, WI
    Posts
    77

    Tried that

    ICE

    If I simply close [myform2] the new data does save to the table and I get a return to [myform1] which is where I did leave off. However, now I need to fill in the data on [myform1]. The problem is unless I close [myform1] the new data just added does not show up on the unbound combo box. Therefore, the new info can't be added to the table for which [myform1] is being used.

    What I need to do is reset the current [myform1] such that the combo box will be up to date as well as keeping the data already entered.

    I also tried the requery but that didn't work either.

    Another piece of info that may help. If the [myform1] is closed then entering the ID number returns a different form that is essentially an edit form. I do not want my operators to have to start over and then be taken to the edit form. There should be a way to just continue where the operator leaves off i.e., back to the original form.

    ??? Any more suggestions or any code i.e., "On Click" that might work instead of a macro.

  5. #5
    hawzmolly is offline Advanced Beginner
    Windows 7 Access 2003
    Join Date
    Oct 2008
    Location
    Green Bay, WI
    Posts
    77

    Solved

    I was able to solve the problem with your suggestions. Did it using code.

    Thanx all.

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

Similar Threads

  1. If duplicate record, go to original record
    By BigBear in forum Forms
    Replies: 2
    Last Post: 10-06-2010, 02:58 AM
  2. If duplicate record, go to original record
    By islandboy in forum Access
    Replies: 51
    Last Post: 06-02-2010, 04:17 PM
  3. Refresh All goes back to First Record
    By diane802 in forum Forms
    Replies: 4
    Last Post: 12-30-2009, 04:24 PM
  4. Back up database
    By sdondeti in forum Access
    Replies: 15
    Last Post: 11-03-2009, 02:17 PM
  5. Export to other and than back to Access?
    By Boulder257 in forum Import/Export Data
    Replies: 1
    Last Post: 07-21-2006, 05:59 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