Results 1 to 5 of 5
  1. #1
    data808 is offline Noob
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    727

    Queries Questions

    I have watched some videos on how to do simple queries however, I was disappointed with how they work. If I create a specific query with settings to look for certain fields, I can save it then I would have to click on "run" to execute it. But then later, if someone else were to use this query who is not computer savvy, may mistakenly click some of the settings and it may no longer run properly. Not to mention it seems that you have to use some kind of language to do simple queries (SQL?) which I'm sure not everyone knows about.



    Basically what I am asking is that I need to create a database that is user friendly for all people that are going to use this to look up and enter information into this database. So I would need to protect certain settings so that the people using this do not change any of the settings by mistake to mess up its functions. Is this possible? I would like it to have an admin account or at least to just protect the settings with a password so it can't be touched once I've set it up.

    Thank you very much for any help.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    You want the users to only use forms. Access is a data management system but it also is used for application development. You need to develop an application that the user will interact with, a GUI that is strictly of the form type.

    You can adjust your DB to launch a form of your choice. This form needs to allow the users to move around in the program. You can also add code to hide other objects such as tables and queries from the users.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You might go to the Microsoft website and download a template and see how it is designed. Or tear apart several...

    http://office.microsoft.com/en-us/te...5-453bb24bd0cf

  4. #4
    data808 is offline Noob
    Windows XP Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    727
    Yes this is exactly what I want. Do you know where I can go to get the code I need to make this happen? Do you know if it's really hard to do? I just want them to use a form with some buttons like Save, Print, and Add New Record. I want the form to also be able to do searches for records. Does this sound like its something hard to do?

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by ItsMe View Post
    You can adjust your DB to launch a form of your choice. This form needs to allow the users to move around in the program. You can also add code to hide other objects such as tables and queries from the users.
    If you right click your Ribbon then choose "Customize Quick Access Toolbar" you can adjust settings that affect how your DB runs. Under "Current Database" there is an uoption to choose your "Display Form". This will launch a form of your choosing at startup. After setting this option, you can bypass the form opening by holding down the "Shift" key during startup.

    You can take it step further and use VBA to show or hide various componants of Access.

    To hide the entire Ribbon you can use the following. You can place it behind a couple of buttons' click events to see how it works.

    'Hide the Ribbon
    DoCmd.ShowToolbar "Ribbon", acToolbarNo

    'Show the Ribbon
    DoCmd.ShowToolbar "Ribbon", acToolbarYes

    There are other features that you can disable or enable too. The best explanation how this works that I have found so far is here, starting at post # 4
    https://www.accessforums.net/securit...lbar-3536.html

    You will need to place a function in a standard module before the "ChangeProperty" function can be called. ChangeProperty is not a built in function but you can add it to your program.


    Code:
    Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
    Dim dbs As Object, prp As Variant
    Const conPropNotFoundError = 3270
    Set dbs = CurrentDb
    On Error GoTo Change_Err
    dbs.Properties(strPropName) = varPropValue
    ChangeProperty = True
    Change_Bye:
    Exit Function
    Change_Err:
    If Err = conPropNotFoundError Then ' Property not found.
    Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
    dbs.Properties.Append prp
    Resume Next
    Else
    ' Unknown error.
    ChangeProperty = False
    Resume Change_Bye
    End If
    End Function

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

Similar Threads

  1. Replies: 7
    Last Post: 10-07-2013, 01:57 PM
  2. Replies: 7
    Last Post: 04-24-2012, 11:42 AM
  3. QBF Questions
    By brandonze in forum Forms
    Replies: 2
    Last Post: 08-04-2011, 01:49 PM
  4. Questions about upsizing
    By jrhbright in forum Import/Export Data
    Replies: 5
    Last Post: 06-03-2011, 08:32 AM
  5. More search questions
    By jakeao in forum Programming
    Replies: 27
    Last Post: 08-23-2009, 09:59 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