Results 1 to 7 of 7
  1. #1
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409

    input form on sql server

    hi


    i need to create a form just for data input that i want to distribute to the employee of the company.
    the form should input values in the sql server, without let employee see tables. How can i do?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    make the form that connects to the linked sql table
    hide the table (property)

    make a macro called autoexec. this will run code at db open
    1.hide the db when it opens,
    2. then show the input form.

    runcode HideDB()
    openform "myForm"

    in vbe, insert a module, and add this code.....
    Code:
    Public Function HideDB()
        DoCmd.SelectObject acTable, , True
        DoCmd.RunCommand acCmdWindowHide
    End Function

  3. #3
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    whoa, so rapid. thx, when i go to the company i'll try it, it seems easy
    your help il precious and appreciated, thx very much

    i have a few question:

    1) i have first to create the form on a new database, and i have to link the form to the specific sql table, is it right? i'm not sure how to do that, is it through the ODBC database in "external data"?
    2) i already made some macro, but how can make this macro?

    runcode HideDB()
    openform "myForm"

    3) how can i insert the vba code? or better, where?

    sorry i'm not so advanced...

    Quote Originally Posted by ranman256 View Post
    make the form that connects to the linked sql table
    hide the table (property)

    make a macro called autoexec. this will run code at db open
    1.hide the db when it opens,
    2. then how the input form.

    in vbe, insert a module, and add this code.....
    Code:
    Public Function HideDB()
        DoCmd.SelectObject acTable, , True
        DoCmd.RunCommand acCmdWindowHide
    End Function

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    click the External data tab, ODBC databases, pick your server/user/password
    it shows as a table,
    connect form to the table,
    hide everything but the form.

  5. #5
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    Quote Originally Posted by ranman256 View Post
    click the External data tab, ODBC databases, pick your server/user/password
    it shows as a table,
    connect form to the table,
    hide everything but the form.
    thx very much, i do not want to ask too much, i have just few doubts.

    1) if i hide a table, employees could see it if they go to the "custom view" on navigation panel, isn't it?
    2) may i create a form that do not displays values, but only input?
    3) i have then to create a package? or i have just to give the files to the employess?

  6. #6
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    if you hide the table, AND hide the db, users cannot see anything.
    The avg user wont even want to look at the table, or try to figure out how to see the table.

  7. #7
    diegomarino is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    409
    Quote Originally Posted by ranman256 View Post
    if you hide the table, AND hide the db, users cannot see anything.
    The avg user wont even want to look at the table, or try to figure out how to see the table.
    great, so this is the procedure.

    1) open a new database
    2) create a form i want to use
    3) connect to the sql server using the ODBC DATABASE, and link the form to the table and hide everything except the form
    4) i make the macro you wrote before
    5) i give the file to employees... or the package? what is better.

    sorry to bother u, but i really need this info

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

Similar Threads

  1. Upgrade from SQL Server 2008 to SQL Server 2014
    By RayMilhon in forum SQL Server
    Replies: 4
    Last Post: 07-12-2017, 04:54 PM
  2. Replies: 5
    Last Post: 09-23-2015, 02:29 PM
  3. Replies: 1
    Last Post: 11-04-2014, 12:07 PM
  4. Replies: 6
    Last Post: 10-27-2014, 08:05 PM
  5. Input Forms - How To Input Multiple Fields/Records?
    By butterbescotch in forum Forms
    Replies: 1
    Last Post: 04-04-2013, 06:30 AM

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