Open an Excel file if Criteria Met - Access 2007

Kereng

Registered User.
Local time
Today, 09:02
Joined
Feb 8, 2011
Messages
19
Hi,

I have created a data entry form and one of the things I would like to do is to have an Excel file open automatically if the value in one of the data entry form fields is above a certain criteria (this will then trigger the data entry person that they need to complete another file, which is not yet linked into Access).

Is it possible to do this? If so, any advice on how to do so would be great. I am very new to Access and don't yet know VBA or SQL.

If it's not possible by this method, would it be possible to trigger it to open another data entry form in the same database? (in which case I could expedite my plan to bring the other data over into Access).

Thanks.
 
Hi,

I have created a data entry form and one of the things I would like to do is to have an Excel file open automatically if the value in one of the data entry form fields is above a certain criteria (this will then trigger the data entry person that they need to complete another file, which is not yet linked into Access).

Is it possible to do this? If so, any advice on how to do so would be great. I am very new to Access and don't yet know VBA or SQL.

If it's not possible by this method, would it be possible to trigger it to open another data entry form in the same database? (in which case I could expedite my plan to bring the other data over into Access).

Thanks.

Yo in the textbox or control's "After Update" event add this code:

Code:
if [yourtextboxName].value > [your value here] then
      Set objExcel = CreateObject("Excel.Application")
      Set objWorkbook = objExcel.Workbooks.Open("C:\location\yourSPREDDY.xls")
end if
 

Users who are viewing this thread

Back
Top Bottom