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
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
you can put a msgbox in the form AFTERUPDATE event.
but this will be tedious and irritating.Code:sub form_afterupdate() msgbox "you added record" end sub
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.
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.
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.
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?
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.
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.
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.