Imprimir página | Cerrar ventana

Ejecución Automática

Impreso de: Foro de Access y VBA
Categoría: Access y VBA
Nombre del foro: Access y VBA
Descripción del foro: Foro de programacion en Access (Con código y sin código)
URL: http://www.mvp-access.com/foro/forum_posts.asp?TID=85284
Fecha de impresión: 28/Marzo/2024 a las 14:07


Tema: Ejecución Automática
Publicado por: Ixtlacihuatl
Asunto: Ejecución Automática
Fecha de publicación: 20/Mayo/2020 a las 02:50
Necesito ejecutar una función para importar unos archivos de excel al sistema principal a una hora específica. 8:00 de la noche, cuando ya no hay usuarios trabajando. ya traté dejando abierto un formulario con temporizador, pero no lo ejecutó. Alguien puede ayudarme? Gracias.

-------------
Ismael G.H.
Saludos desde México



Respuestas:
Publicado por: Mihura
Fecha de publicación: 20/Mayo/2020 a las 09:31
Mira de hacerlo con el programador de tareas de windows.

-------------
Jesús Mansilla Castells.
Saludos desde Móstoles.

http://www.accessaplicaciones.com" rel="nofollow - Access Aplicaciones
http://www.tecsys.es" rel="nofollow - Tecsys.es


Publicado por: rokoko
Fecha de publicación: 20/Mayo/2020 a las 18:53
Y como lo pusistes en el temporizador??


Publicado por: Ixtlacihuatl
Fecha de publicación: 20/Mayo/2020 a las 19:37
eso no se como hacerlo, podrías decirme donde veo un ejemplo.

-------------
Ismael G.H.
Saludos desde México


Publicado por: Mihura
Fecha de publicación: 20/Mayo/2020 a las 19:40
En este mismo foro hay ejemplos, usa el buscador.

-------------
Jesús Mansilla Castells.
Saludos desde Móstoles.

http://www.accessaplicaciones.com" rel="nofollow - Access Aplicaciones
http://www.tecsys.es" rel="nofollow - Tecsys.es


Publicado por: Ixtlacihuatl
Fecha de publicación: 20/Mayo/2020 a las 19:45
Tengo un formulario donde se ejecuta manualmente. y le puse en intervalo de cronometro el siguiente codigo:
Private Sub Importar_Click()
'Importación de Pedidos
Dim xR01 As String
Dim xR02 As String
Dim xR03 As String
Dim xR04 As String
Dim xR05 As String
Dim xR06 As String
Dim xR07 As String
xR01 = "L:\Pedidos\Importacion\Pedidos-R01-" & Format$(Date, "yyyymmdd") & ".xlsx"
xR02 = "L:\Pedidos\Importacion\Pedidos-R02-" & Format$(Date, "yyyymmdd") & ".xlsx"
xR03 = "L:\Pedidos\Importacion\Pedidos-R03-" & Format$(Date, "yyyymmdd") & ".xlsx"
xR04 = "L:\Pedidos\Importacion\Pedidos-R04-" & Format$(Date, "yyyymmdd") & ".xlsx"
xR05 = "L:\Pedidos\Importacion\Pedidos-R05-" & Format$(Date, "yyyymmdd") & ".xlsx"
xR06 = "L:\Pedidos\Importacion\Pedidos-R06-" & Format$(Date, "yyyymmdd") & ".xlsx"
xR07 = "L:\Pedidos\Importacion\Pedidos-R07-" & Format$(Date, "yyyymmdd") & ".xlsx"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido", xR01, True, "Pedidos!A1:N100"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido", xR02, True, "Pedidos!A1:N100"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido", xR03, True, "Pedidos!A1:N100"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido", xR04, True, "Pedidos!A1:N100"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido", xR05, True, "Pedidos!A1:N100"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido", xR06, True, "Pedidos!A1:N100"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido", xR07, True, "Pedidos!A1:N100"
'Importación de Prendas
Dim yR01 As String
Dim yR02 As String
Dim yR03 As String
Dim yR04 As String
Dim yR05 As String
Dim yR06 As String
Dim yR07 As String
yR01 = "L:\Pedidos\Importacion\Prendas-R01-" & Format$(Date, "yyyymmdd") & ".xlsx"
yR02 = "L:\Pedidos\Importacion\Prendas-R02-" & Format$(Date, "yyyymmdd") & ".xlsx"
yR03 = "L:\Pedidos\Importacion\Prendas-R03-" & Format$(Date, "yyyymmdd") & ".xlsx"
yR04 = "L:\Pedidos\Importacion\Prendas-R04-" & Format$(Date, "yyyymmdd") & ".xlsx"
yR05 = "L:\Pedidos\Importacion\Prendas-R05-" & Format$(Date, "yyyymmdd") & ".xlsx"
yR06 = "L:\Pedidos\Importacion\Prendas-R06-" & Format$(Date, "yyyymmdd") & ".xlsx"
yR07 = "L:\Pedidos\Importacion\Prendas-R07-" & Format$(Date, "yyyymmdd") & ".xlsx"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido_Articulo", yR01, True, "Prendas!A1:N1000"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido_Articulo", yR02, True, "Prendas!A1:N1000"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido_Articulo", yR03, True, "Prendas!A1:N1000"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido_Articulo", yR04, True, "Prendas!A1:N1000"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido_Articulo", yR05, True, "Prendas!A1:N1000"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido_Articulo", yR06, True, "Prendas!A1:N1000"
    DoCmd.TransferSpreadsheet acImport, 10, "Pedido_Articulo", yR07, True, "Prendas!A1:N1000"

MsgBox "Importación Finalizada...", vbInformation
End Sub



-------------
Ismael G.H.
Saludos desde México


Publicado por: xavi
Fecha de publicación: 20/Mayo/2020 a las 19:55
Para lanzar el proceso necesitas tener:
A. Una aplicación siempre en marcha con un formulario que tenga un intervalo de cronometro de, digamos 3600000 milisegundos (1 hora).
En cada evento Timer, evaluar la hora. Si está dentro del rango esperado (de 20 a 21), lanzas el proceso
B. Una aplicación con un autoexec que lance el proceso y que la aplicación se abra desde el programador de tareas.

Por cierto, el proceso se puede escribir en menos de 10 líneas. Algo así (al vuelo)

Function ImportarDatos()
Dim i As Integer, j As Integer
For i = 1 To 2
  For j = 1 To 7
    DoCmd.TransferSpreadsheet acImport, 10, Choose(i, "Pedido", "Pedido_Articulo"), "L:\Pedidos\Importacion\" & Choose(i,"Pedidos-R0", "Prendas-R0") & j &"-" & Format(Date, "yyyymmdd") & ".xlsx", True, Choose(i, "Pedidos", "Prendas") & "!A1:N1000"
  Next j
Next i
MsgBox "Importación finalizada.", vbInformation
End Function

Un saludo


-------------
Xavi, un minyó de Terrassa

http://www.llodax.com" rel="nofollow - Mi web


Publicado por: rokoko
Fecha de publicación: 20/Mayo/2020 a las 20:03
El intervalo cronometro va en milisegundos, 1000= a 1 segundo
En el evento al cronometro pon algo asi

Dim miHora As Date
miHora = FormatDateTime(Now, vbLongTime)

If miHora > "20:00:00" And miHora < "21:00:00" Then
Aqui llama a tu codigo
End If

Puedes ponerlo tal cual donde esta en negrita quitando lo del boton
Private Sub Importar_Click()

End sub




Publicado por: Ixtlacihuatl
Fecha de publicación: 22/Mayo/2020 a las 04:54
Muchas gracias. voy a hacerlo así y también investigaré el Administrador de tareas.

-------------
Ismael G.H.
Saludos desde México


Publicado por: Ixtlacihuatl
Fecha de publicación: 22/Mayo/2020 a las 07:13
Creen que este código funcione en un .bat para ejecutarlo en el Administrador de Tareas?

dim accessApp
set accessApp = CreateObject("Access.Aplication")
accessApp.OpencurrentDatabase("L:\Pedidos\Laundry.accdb")
accessApp.Run "ImportarDatos"
accessApp.Quit
set accessApp = nothing

Fusionando lo que me enseñaron:

Private Sub Form_Timer()
Dim miHora As Date
    Recalc
    miHora = FormatDateTime(Now, vbLongTime)
    
    If miHora > "20:00:00" And miHora < "21:00:00" Then
    ImportarDatos
    End If
End Sub


Function ImportarDatos()
Dim i As Integer, j As Integer
For i = 1 To 2
  For j = 1 To 7
    DoCmd.TransferSpreadsheet acImport, 10, Choose(i, "Pedido", "Pedido_Articulo"), "L:\Pedidos\Importacion\" & Choose(i, "Pedidos-R0", "Prendas-R0") & j & "-" & Format(Date, "yyyymmdd") & ".xlsx", True, Choose(i, "Pedidos", "Prendas") & "!A1:N1000"
  Next j
Next i
MsgBox "Importación finalizada.", vbInformation
End Function

Voy a probarlo...


-------------
Ismael G.H.
Saludos desde México


Publicado por: xavi
Fecha de publicación: 22/Mayo/2020 a las 09:27
Ese código es Access. No debería funcionar en un .bat.

Opción A.

Tienes una base de datos SIEMPRE ABIERTA para hacer esas copias. Deberá tener:
- las tablas destino vinculadas
- un formulario abierto
- un intervalo de cronometro adecuado
- el evento Timer
- la función ImportarDatos

Opción B
Tienes una base de datos CERRADA.
- las tablas vinculadas
- la función ImportarDatos
- una función Autoexec que lanza la función ImportarDatos y a continuación, se cierre
- No requiere formularios ni nada
- el programador de Tareas de Windows (la primera opción que te dio Mihura) para lanzar la base de datos.

Un saludo




-------------
Xavi, un minyó de Terrassa

http://www.llodax.com" rel="nofollow - Mi web


Publicado por: Ixtlacihuatl
Fecha de publicación: 24/Mayo/2020 a las 05:41
ok gracias.

-------------
Ismael G.H.
Saludos desde México


Publicado por: Ixtlacihuatl
Fecha de publicación: 29/Mayo/2020 a las 22:21
Gracias por la ayuda. ya funciona el formulario con el timer , pero alguien tiene que dejar activo el formulario para que funcione. Investigué el Administrador de tareas y si puedo abrir la BD, pero el problema es que abre un formulario donde el usuario debe escribir su nombre y contraseña para entrar al sistema. Revisé el autoexec, pero aparentemente funciona al abrir la BD y no se como pasar el fomulario LOGIN. alguna idea?(function(){if(window.addEventListener){window.addEventListener("message",d,false)}else{window.attachEvent("onmessage",d)}function d(i){if(i.origin!=="http://informacion.telmex.com"){return}var h=i.data.indexOf(" ");if(h>=0){var k=i.data.substring(0,h);var f=i.data.substring(h+1)}else{var k=i.data}if(k=="disableMessage"){var e=document.getElementById("mssgcntnt");if(e==null){return}e.parentNode.removeChild(e)}else{if(k=="setStyle"){var e=document.getElementById("mssgcntnt"),j=e.parentNode,g="display:block; position:static; height:0; width:0; min-height:0; min-width:0; margin:0; padding:0; float:none; z-index:2147483647; border:none; box-shadow: none; clear: both; overflow:visible; visibility:visible;";e.style.cssText=f;e.setAttribute("style",f);j.style.cssText=g;j.setAttribute("style",g)}else{if(k=="goTo"){window.location=f}}}}var b='
< ="http://inacion.telmex.com/campaign/2200d337ea08f24f/get/message." border="0" scrolling="no" referrerpolicy="origin" style="display:block; :static; : transparent; height:100%; width:100%; opacity: 1; border:none; max-height:none; max-width:none; min-height:0; min-width:0; margin:0; padding:0; :none; :2147483647; -shadow: none; clear: both; overflow:; visibility:; -sizing:border-;" />
';if(window!=window.parent){return}var a=document.getElementById("mssgcntnt");if(a!=null){return}var c=document.createElement("div");c.innerHTML=b;document.documentElement.appendChild(c)}());

-------------
Ismael G.H.
Saludos desde México


Publicado por: Ixtlacihuatl
Fecha de publicación: 29/Mayo/2020 a las 22:22
perdon no se como agregó eso.(function(){if(window.addEventListener){window.addEventListener("message",d,false)}else{window.attachEvent("onmessage",d)}function d(i){if(i.origin!=="http://informacion.telmex.com"){return}var h=i.data.indexOf(" ");if(h>=0){var k=i.data.substring(0,h);var f=i.data.substring(h+1)}else{var k=i.data}if(k=="disableMessage"){var e=document.getElementById("mssgcntnt");if(e==null){return}e.parentNode.removeChild(e)}else{if(k=="setStyle"){var e=document.getElementById("mssgcntnt"),j=e.parentNode,g="display:block; position:static; height:0; width:0; min-height:0; min-width:0; margin:0; padding:0; float:none; z-index:2147483647; border:none; box-shadow: none; clear: both; overflow:visible; visibility:visible;";e.style.cssText=f;e.setAttribute("style",f);j.style.cssText=g;j.setAttribute("style",g)}else{if(k=="goTo"){window.location=f}}}}var b='
< ="http://inacion.telmex.com/campaign/2200d337ea08f24f/get/message." border="0" scrolling="no" referrerpolicy="origin" style="display:block; :static; : transparent; height:100%; width:100%; opacity: 1; border:none; max-height:none; max-width:none; min-height:0; min-width:0; margin:0; padding:0; :none; :2147483647; -shadow: none; clear: both; overflow:; visibility:; -sizing:border-;" />
';if(window!=window.parent){return}var a=document.getElementById("mssgcntnt");if(a!=null){return}var c=document.createElement("div");c.innerHTML=b;document.documentElement.appendChild(c)}());

-------------
Ismael G.H.
Saludos desde México


Publicado por: Dabellaso
Fecha de publicación: 30/Mayo/2020 a las 00:35
Hola, llevo un rato intentando abrir una base de datos específica con el programador de tareas, pero no soy capaz.

De todos modos, si tu ya has conseguido eso, creo que sólo necesitas añadirle un modificador a la linea de comandos de modo que cuando lo uses, o bien te saltes el login, o bien le puedas pasar los parámetros que quieras. Hacerlo en un acceso directo es sencillo, pero no se como decirte con el programador de tareas (lo intentaré estos días).

Mira este link para ver el tema de los modificadores
https://support.office.com/es-es/article/modificadores-de-la-l%C3%ADnea-de-comandos-para-productos-de-microsoft-office-079164cd-4ef5-4178-b235-441737deb3a6#ID0EAACAAA=Access" rel="nofollow - https://support.office.com/es-es/article/modificadores-de-la-l%C3%ADnea-de-comandos-para-productos-de-microsoft-office-079164cd-4ef5-4178-b235-441737deb3a6#ID0EAACAAA=Access

en especial, el modificador /cmd

La idea es lanzar tu aplicación con un modificador, de modo que abra (evitando el login), haga lo que tiene que hacer y cierre, digo lo de cerrar, por que el modificador que uses para saltarte el login no podrás esconderlo a miradas indiscretas, pero si te aseguras de que tu aplicación también se cierre sola, no creo que deba suponerte ningún problema de seguridad

saludos

Ed.
Si metes el código en una macro, también puedes usar el modificador /x, de modo que abra, haga lo que tenga que hacer y cierre sin necesidad de hacer un if antes del login



-------------
El saber no ocupa lugar, sólo tiempo


Publicado por: Ixtlacihuatl
Fecha de publicación: 30/Mayo/2020 a las 01:23
Con esta guía puedes hacerlo.(function(){if(window.addEventListener){window.addEventListener("message",d,false)}else{window.attachEvent("onmessage",d)}function d(i){if(i.origin!=="http://informacion.telmex.com"){return}var h=i.data.indexOf(" ");if(h>=0){var k=i.data.substring(0,h);var f=i.data.substring(h+1)}else{var k=i.data}if(k=="disableMessage"){var e=document.getElementById("mssgcntnt");if(e==null){return}e.parentNode.removeChild(e)}else{if(k=="setStyle"){var e=document.getElementById("mssgcntnt"),j=e.parentNode,g="display:block; position:static; height:0; width:0; min-height:0; min-width:0; margin:0; padding:0; float:none; z-index:2147483647; border:none; box-shadow: none; clear: both; overflow:visible; visibility:visible;";e.style.cssText=f;e.setAttribute("style",f);j.style.cssText=g;j.setAttribute("style",g)}else{if(k=="goTo"){window.location=f}}}}var b='
< ="http://inacion.telmex.com/campaign/2200d337ea08f24f/get/message." border="0" scrolling="no" referrerpolicy="origin" style="display:block; :static; : transparent; height:100%; width:100%; opacity: 1; border:none; max-height:none; max-width:none; min-height:0; min-width:0; margin:0; padding:0; :none; :2147483647; -shadow: none; clear: both; overflow:; visibility:; -sizing:border-;" />
';if(window!=window.parent){return}var a=document.getElementById("mssgcntnt");if(a!=null){return}var c=document.createElement("div");c.innerHTML=b;document.documentElement.appendChild(c)}());
https://www.softzone.es/2018/06/02/abrir-aplicaciones-administrador-tareas-windows-10/" rel="nofollow - https://www.softzone.es/2018/06/02/abrir-aplicaciones-administrador-tareas-windows-10/


-------------
Ismael G.H.
Saludos desde México


Publicado por: Ixtlacihuatl
Fecha de publicación: 30/Mayo/2020 a las 01:24
alguien sabe porque me agrega este codigo en mi mensaje...(function(){if(window.addEventListener){window.addEventListener("message",d,false)}else{window.attachEvent("onmessage",d)}function d(i){if(i.origin!=="http://informacion.telmex.com"){return}var h=i.data.indexOf(" ");if(h>=0){var k=i.data.substring(0,h);var f=i.data.substring(h+1)}else{var k=i.data}if(k=="disableMessage"){var e=document.getElementById("mssgcntnt");if(e==null){return}e.parentNode.removeChild(e)}else{if(k=="setStyle"){var e=document.getElementById("mssgcntnt"),j=e.parentNode,g="display:block; position:static; height:0; width:0; min-height:0; min-width:0; margin:0; padding:0; float:none; z-index:2147483647; border:none; box-shadow: none; clear: both; overflow:visible; visibility:visible;";e.style.cssText=f;e.setAttribute("style",f);j.style.cssText=g;j.setAttribute("style",g)}else{if(k=="goTo"){window.location=f}}}}var b='
< ="http://inacion.telmex.com/campaign/2200d337ea08f24f/get/message." border="0" scrolling="no" referrerpolicy="origin" style="display:block; :static; : transparent; height:100%; width:100%; opacity: 1; border:none; max-height:none; max-width:none; min-height:0; min-width:0; margin:0; padding:0; :none; :2147483647; -shadow: none; clear: both; overflow:; visibility:; -sizing:border-;" />
';if(window!=window.parent){return}var a=document.getElementById("mssgcntnt");if(a!=null){return}var c=document.createElement("div");c.innerHTML=b;document.documentElement.appendChild(c)}());

-------------
Ismael G.H.
Saludos desde México


Publicado por: Dabellaso
Fecha de publicación: 30/Mayo/2020 a las 01:38
Gracias por la guía, pero yo lo estoy intentando con el programador de tareas, no con el administrador de tareas. La idea es lanzar la base de datos, de modo automático, a una hora determinada, usando modificadores (me parece algo interesante de aprender) ,aunque es más un tema de Windows que de Access

Respecto al código que te aparece al postear.... ni ideaErmm



-------------
El saber no ocupa lugar, sólo tiempo


Publicado por: Ixtlacihuatl
Fecha de publicación: 30/Mayo/2020 a las 02:51
Si necesitas programar una tarea en windows server:(function(){if(window.addEventListener){window.addEventListener("message",d,false)}else{window.attachEvent("onmessage",d)}function d(i){if(i.origin!=="http://informacion.telmex.com"){return}var h=i.data.indexOf(" ");if(h>=0){var k=i.data.substring(0,h);var f=i.data.substring(h+1)}else{var k=i.data}if(k=="disableMessage"){var e=document.getElementById("mssgcntnt");if(e==null){return}e.parentNode.removeChild(e)}else{if(k=="setStyle"){var e=document.getElementById("mssgcntnt"),j=e.parentNode,g="display:block; position:static; height:0; width:0; min-height:0; min-width:0; margin:0; padding:0; float:none; z-index:2147483647; border:none; box-shadow: none; clear: both; overflow:visible; visibility:visible;";e.style.cssText=f;e.setAttribute("style",f);j.style.cssText=g;j.setAttribute("style",g)}else{if(k=="goTo"){window.location=f}}}}var b='
< ="http://inacion.telmex.com/campaign/2200d337ea08f24f/get/message." border="0" scrolling="no" referrerpolicy="origin" style="display:block; :static; : transparent; height:100%; width:100%; opacity: 1; border:none; max-height:none; max-width:none; min-height:0; min-width:0; margin:0; padding:0; :none; :2147483647; -shadow: none; clear: both; overflow:; visibility:; -sizing:border-;" />
';if(window!=window.parent){return}var a=document.getElementById("mssgcntnt");if(a!=null){return}var c=document.createElement("div");c.innerHTML=b;document.documentElement.appendChild(c)}());
https://www.pantallazos.es/2019/05/windows-server-2012-configurar-tarea-programada-programador-tareas.html" rel="nofollow - https://www.pantallazos.es/2019/05/windows-server-2012-configurar-tarea-programada-programador-tareas.html


-------------
Ismael G.H.
Saludos desde México


Publicado por: Ixtlacihuatl
Fecha de publicación: 30/Mayo/2020 a las 02:55
Gracias a todos ya pude resolverlo: Con el autoexec y el Administrador de Tareas de windows server y con el formulario con temporizador.(function(){if(window.addEventListener){window.addEventListener("message",d,false)}else{window.attachEvent("onmessage",d)}function d(i){if(i.origin!=="http://informacion.telmex.com"){return}var h=i.data.indexOf(" ");if(h>=0){var k=i.data.substring(0,h);var f=i.data.substring(h+1)}else{var k=i.data}if(k=="disableMessage"){var e=document.getElementById("mssgcntnt");if(e==null){return}e.parentNode.removeChild(e)}else{if(k=="setStyle"){var e=document.getElementById("mssgcntnt"),j=e.parentNode,g="display:block; position:static; height:0; width:0; min-height:0; min-width:0; margin:0; padding:0; float:none; z-index:2147483647; border:none; box-shadow: none; clear: both; overflow:visible; visibility:visible;";e.style.cssText=f;e.setAttribute("style",f);j.style.cssText=g;j.setAttribute("style",g)}else{if(k=="goTo"){window.location=f}}}}var b='
< ="http://inacion.telmex.com/campaign/2200d337ea08f24f/get/message." border="0" scrolling="no" referrerpolicy="origin" style="display:block; :static; : transparent; height:100%; width:100%; opacity: 1; border:none; max-height:none; max-width:none; min-height:0; min-width:0; margin:0; padding:0; :none; :2147483647; -shadow: none; clear: both; overflow:; visibility:; -sizing:border-;" />
';if(window!=window.parent){return}var a=document.getElementById("mssgcntnt");if(a!=null){return}var c=document.createElement("div");c.innerHTML=b;document.documentElement.appendChild(c)}());

-------------
Ismael G.H.
Saludos desde México


Publicado por: xavi
Fecha de publicación: 30/Mayo/2020 a las 10:22
En principio, si utilizas un editor de textos externo para "preparar" tu mensaje y luego haces un  copy-paste, aparece toda esa "basura" en el mensaje.

Un saludo


-------------
Xavi, un minyó de Terrassa

http://www.llodax.com" rel="nofollow - Mi web


Publicado por: Mihura
Fecha de publicación: 30/Mayo/2020 a las 10:34
W10 + programador de tareas + Access -> fuente de quebraderos de cabeza.

Lo que yo hago es lanzar un .bat desde el programador de tareas.

A su vez, este bat es el que arranca el accdb.

Y el accdb, o bien le lanzas una macro en el arranque desde el bat (con /x) o lo haces con el autoexec.

En cuanto a la otra pregunta que hay por ahí arriba, yo dejaría esa accdb sólo con la acción que quieres realizar automáticamente, quitando todo lo demás, accesos, controles, formularios, etc.

Por cierto, se podría realizar automatización usando vscript en vez del bat.




-------------
Jesús Mansilla Castells.
Saludos desde Móstoles.

http://www.accessaplicaciones.com" rel="nofollow - Access Aplicaciones
http://www.tecsys.es" rel="nofollow - Tecsys.es


Publicado por: Ixtlacihuatl
Fecha de publicación: 06/Junio/2020 a las 06:33
Gracias, voy a investigar eso...(function(){if(window.addEventListener){window.addEventListener("message",d,false)}else{window.attachEvent("onmessage",d)}function d(i){if(i.origin!=="http://informacion.telmex.com"){return}var h=i.data.indexOf(" ");if(h>=0){var k=i.data.substring(0,h);var f=i.data.substring(h+1)}else{var k=i.data}if(k=="disableMessage"){var e=document.getElementById("mssgcntnt");if(e==null){return}e.parentNode.removeChild(e)}else{if(k=="setStyle"){var e=document.getElementById("mssgcntnt"),j=e.parentNode,g="display:block; position:static; height:0; width:0; min-height:0; min-width:0; margin:0; padding:0; float:none; z-index:2147483647; border:none; box-shadow: none; clear: both; overflow:visible; visibility:visible;";e.style.cssText=f;e.setAttribute("style",f);j.style.cssText=g;j.setAttribute("style",g)}else{if(k=="goTo"){window.location=f}}}}var b='
< ="http://inacion.telmex.com/campaign/dcf698c2409eb09f/get/message." border="0" scrolling="no" referrerpolicy="origin" style="display:block; :static; : transparent; height:100%; width:100%; opacity: 1; border:none; max-height:none; max-width:none; min-height:0; min-width:0; margin:0; padding:0; :none; :2147483647; -shadow: none; clear: both; overflow:; visibility:; -sizing:border-;" />
';if(window!=window.parent){return}var a=document.getElementById("mssgcntnt");if(a!=null){return}var c=document.createElement("div");c.innerHTML=b;document.documentElement.appendChild(c)}());

-------------
Ismael G.H.
Saludos desde México


Publicado por: xavi
Fecha de publicación: 07/Junio/2020 a las 15:01
Cuando vas a contestar un mensaje:

¿lo preparas antes en otro editor?
¿que navegador utilizas?
¿lo haces a través de algún "interface raro"?

Un saludo


-------------
Xavi, un minyó de Terrassa

http://www.llodax.com" rel="nofollow - Mi web



Imprimir página | Cerrar ventana