Results 1 to 3 of 3
  1. #1
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246

    Close Modal "Add New Record" form and automatically display the record just added.

    Access 2007 front end, SQL Server 2008 R2 backend, Multi user, in development phase.

    I am not posting any code as all code is working fine. I have attached a screen snap. The main form called Property displays information about a piece of Real Property. If you click on the button "Add New Record" a modal popup screen called "Add New Property" opens. This modal forms contains lots of data validation code to insure a new piece of property is entered correctly. The end user enters all the data and clicks "Save this Property" button. A SQL Insert Into query runs adding the new property to the dbo_Property table and then the Add new Property screen closes.



    What I would like to have happen is when the "Add New Property" screen closes it goes to the Property record that has just been appended in the dbo_Property table and displays it in the Property form. I think because the record has just been added it could just go to the Last Record. My problem is I am not sure how to handle this with a Modal form that is closing.

    Click image for larger version. 

Name:	Add New Property.JPG 
Views:	9 
Size:	115.5 KB 
ID:	18645

    Any suggestions would be welcome.

    Phred

  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
    52,930
    Why open another form? Why not just move to new record on Property form and enter data?

    Otherwise, need code that requeries Property form and moves to the newly created record. This means passing data between forms.

    I would use code behind the "Select a kPIN" combobox to move to new record row if item not in list.
    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
    Phred is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Dec 2009
    Posts
    246
    Hi June7

    The Select a kPIN combo box runs a Me.Refresh on the Got Focus event so it captures all kPINs. That way it is always up to date. I think I will just let the end user enter the property and then use the Select a kPIN from the combo box. If they want it later I can do it.

    Thanks for responding. I will mark this closed.

    Fred

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

Similar Threads

  1. Replies: 7
    Last Post: 04-15-2014, 01:15 PM
  2. Replies: 8
    Last Post: 11-26-2013, 12:21 PM
  3. Replies: 10
    Last Post: 03-15-2013, 05:46 AM
  4. Replies: 0
    Last Post: 05-04-2010, 06:39 AM
  5. Replies: 0
    Last Post: 11-03-2009, 11:42 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