Results 1 to 7 of 7
  1. #1
    amilq is offline Novice
    Windows 7 64bit Access 2019
    Join Date
    Dec 2022
    Posts
    3

    Rotina em VB no Access, para que o Front-End, possa vincular as tabelas do Back-End quando a bd muda

    Olá amigos.

    Criei um sistema em Access para distribuição e realizei os passos para proteger a BD.

    Compilei o código VB da BD.

    Converter a base de Accdb para Accde.

    Divide a base em back-end e front-end.

    Depois proteja o back-end com uma senha.

    No Front-End, vinvulei as tabelas do Back-End..

    Funcionou na perfeição.

    Como este processo de re-link tem de ser feito cada vez que a BD é mudado de um site para outro seja dentro do mesmo computador (para outra pasta) ou para outro computador, tenho a necessidade de criar uma rotina, que é executada sempre que o FE arranca, para verificar o link e refazê-lo caso a BD tenha sido mudado.

    Isso vai acontecer ao criar o instalador para instalar outro PC.

    O meu problema agora, para o qual peço a sua ajuda, é criar o código para que o Access execute a rotina ao iniciar.

    Criei uma cópia do projeto em ACCDB para que posso inserir o código VB da rotina, e converter de novo para ACCDE.

    PODEM ME AJUDAR NA CRIAÇÃO DESSE CÓDIGO?

    Obrigado

    Desejo a todos um feliz Natal.

    Joaquim

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,757
    Translated:-
    Routine in VB in Access, so that the Front-End can link the Back-End tables when the database changes
    Hello friends.


    I created a system in Access for distribution and performed the steps to protect the BD.


    I compiled the DB's VB code.


    Convert base from Accdb to Accde.


    It divides the base into backend and frontend.


    Then protect the backend with a password.


    In the Front-End, I linked the Back-End tables..


    It worked flawlessly.


    As this re-linking process has to be done every time the DB is changed from one site to another, either within the same computer (to another folder) or to another computer, I have the need to create a routine, which is executed every time the FE starts, to check the link and redo it if the DB has been changed.


    This will happen when creating the installer to install another PC.


    My problem now, for which I ask for your help, is to create the code for Access to execute the routine at startup.


    I created a copy of the project in ACCDB so that I can insert the routine's VB code, and convert it back to ACCDE.


    CAN YOU HELP ME CREATE THIS CODE?


    Thanks


    I wish you all a merry Christmas.


    Joachim
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845

  4. #4
    amilq is offline Novice
    Windows 7 64bit Access 2019
    Join Date
    Dec 2022
    Posts
    3
    Good Morning. It's settled. Thanks

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,274
    Quote Originally Posted by amilq View Post
    Good Morning. It's settled. Thanks
    Well please post what you used. It could help others in the same situation.
    After all, these forums are here to help people, which presumably is the reason you came here in the first place?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    amilq is offline Novice
    Windows 7 64bit Access 2019
    Join Date
    Dec 2022
    Posts
    3
    Hello friend.

    As I couldn't find a solution on the forums, I turned to a paid application.

    It would be easier if I were a programmer, but I'm not.

    Merry Christmas

  7. #7
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,274
    Quote Originally Posted by amilq View Post
    Hello friend.

    As I couldn't find a solution on the forums, I turned to a paid application.

    It would be easier if I were a programmer, but I'm not.

    Merry Christmas
    That is a shame, as there are a good few homemade examples, if not here, then on other sites, and probably only a Google away.

    Have a Merry Xmas and Happy New Year yourself.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

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

Similar Threads

  1. Replies: 2
    Last Post: 09-08-2020, 01:34 AM
  2. Replies: 2
    Last Post: 03-04-2020, 07:45 PM
  3. Front end Access on Sharepoint - Back end SQL Server
    By craig1988 in forum SharePoint
    Replies: 2
    Last Post: 03-26-2018, 08:15 AM
  4. Replies: 8
    Last Post: 08-25-2016, 08:16 PM
  5. Replies: 4
    Last Post: 10-03-2014, 11:57 AM

Tags for this Thread

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