Results 1 to 8 of 8
  1. #1
    BertH is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    3

    Question Open msgbox when linked table added new record

    Hi,

    I'm looking for a way I can make access show me a msgbox when a new record is added to my linked table (.xls)?
    Is this even possible?

    Cheers

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    you can put a msgbox in the form AFTERUPDATE event.
    Code:
    sub form_afterupdate()
    msgbox "you added record"
    end sub
    but this will be tedious and irritating.
    Saving a record is automatic when the user moves off the record or presses the save record bar.
    Putting a message is not really needed.

  3. #3
    BertH is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    3
    I just want a heads up when the linked excelfile has added a new record to the access table so I can handle it asap.
    I will try it this way but I think that the restrictions on a linked table won't allow me to attach code to the table.

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Code is not attached to a table, it pertains to a form (or can be run manually). You will need to trap all the places in the database where a record can be added and perform the subroutine or macro which displays the message.

  5. #5
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    To clarify more, as you saying you enter a record directly into the linked Excel file and you want to know in Access when that has happened? Or are you adding the data through Access?

  6. #6
    BertH is offline Novice
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    3
    The data in the linked excel sheet are added by other people. So I need to know when they added something so i can add additional info to the record.

  7. #7
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    If the data is being added in Excel then that is where you will need to do it. Such as send you an email every time someone adds a record. Or you can have an OnTimer event which checks the linked Excel every so often to see if new records have been added.

  8. #8
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    You mentioned a msgbox, so you are working in Access and when someone enters a record into Excel, you want a notification in MS Access? Or do you want an email outside of Access that someone has entered a new record? Can you change the process for them to use Access to enter the data or is the excel file part of another system that cannot be changed?

    Problem with the Timer in Access is when it triggers, it might interfere with a process in access such as if you are editing a record or running a process, etc. But it might work, have a timer to run a process that checks the total record count in the excel file against a saved total value, if different do a msgbox and write the new value to the table to check again the next time.

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

Similar Threads

  1. Replies: 2
    Last Post: 05-14-2016, 04:43 PM
  2. Email the new record added to access table
    By hazeleyre23 in forum Access
    Replies: 2
    Last Post: 04-07-2016, 06:38 AM
  3. Replies: 5
    Last Post: 06-14-2013, 11:44 AM
  4. Blank Record Being Added to Table
    By Andrew in forum Programming
    Replies: 8
    Last Post: 12-22-2011, 04:41 AM
  5. Replies: 3
    Last Post: 01-21-2010, 08:10 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