Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Menus (2000)

    No doubt an age old question here but I couldn't directly find the answer in previous posts . I have a database with that the user can see the forms and reports. I have a FrmMain and a FrmReport, and then various reports linked from FrmReport, with customized toolbars Form and Report. The problem is I would also like to remove the File,Edit,Insert etc across the top of these toolbars. Therefore just leaving my toolbars on the forms. I would also like to display only the toolbars relevant to the forms, i.e. FrmMain/Report = Toolbar Main, All reports = Toolbar Report. In the startup I have removed Allow menus, built in toolbars and special keys. I have also changed the toolbars in each to their relevant toolbar.
    Also on a side note, is it possible to have a control that will take you to a blank record. I suspect some VB may be involved in this!! Currently the navigation buttons will display 1 of 12, because there are 12 records, but I would like a control similar to Add new record, that actually takes you to number 13 (if that mkes sense!)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Menus (2000)

    You can create a custom menu bar:
    - Select Tools | Customize...
    - Activate the Toolbars tab if necessary.
    - Click New..., specify a name (e.g. MyMenuBar) and click OK.
    - A new blank toolbar will appear. Click Properties.
    - Change the Type from Toolbar to Menu Bar, specify further options if you like, then click OK.
    - If necessary, drag the new menu bar to the top of the Access window.
    - Add menus and items to your menu bar.
    - When you're done, close the Customize window.
    - Select Tools | Startup...
    - Select your menu bar in the Menu Bar dropdown.
    - Click OK.
    Next time you open the database normally, your menu bar will be displayed instead of the built-in version. As usual, you can bypass this by keeping Shift down while opening the database.

    Where would you like the "New Record" control? On a form or on a toolbar?

  3. #3
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Menus (2000)

    Hi Hans,
    Thanks for the advice, I'll have a crack at it and see how I get on.
    With regards to the "New Record" control I would like it to be on FrmMain. Just a simple control for the user to add a new record.
    Also, could I ask your advice on something else as well, with regards to reports.
    I am trying to count CaseID's that equal 14 or 21, from QryMain.
    The current formula I have is:
    =Dcount ("*","QryMain","CaseID"="14")
    But this doesn't seem to work, I've tried several variations of the same. CaseID either equals 14 or 21, as isn't ever Null, or True or False.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Menus (2000)

    1. Make sure that the "Wizard" button on the toolbox is on (down). Then put a command button on the form. The Command Button Wizard will guide you through the steps to create a "new record" button and create the On Click code for you.

    2. Use =DCount ("*","QryMain","CaseID=14")
    Not the difference in the use of quotes.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Menus (2000)

    Hi Hans,
    With regards to 2), I have tried this but when the report is displayed,#Error is displayed instead of a numerical figure. any ideas?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Menus (2000)

    CaseID should have been a number field in tblMain and in tblCaseID, but it is a text field. Try<pre>=DCount("*","QryMain","CaseID='14'")</pre>

    The value 14 has been enclosed in single quotes to specify it as a text value.

  7. #7
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Menus (2000)

    Hi Hans,
    Thanks for that.
    The problem I'm having with the toolbars is that I have a Main Toolbar that I have now placed in StartUp as a Menu Bar. I also have a toolbar for the reports that have more functions on them. The problem with this toolbar is that although its only assigned to the reports, it is still visible with FrmMain, along with the Main Toolbar, thus allowing the user more functions than I want them to have.
    And one final question (honestly), I now have two completed databases that I would like to keep seperate but have access to them on the same form. Therefore effectively having one MainForm with 2 controls, taking you to either database. Originally I planned to do this in a seperate access database with just a form in it and two controls too link to the other databases.
    I wanted some advice as too the best way to do this. I know I could import the two databases together and make a central controlling form but I wondered whether this would be best or not. Advice would be appreciated.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Menus (2000)

    Make sure that the report toolbar is not visible when you close the database.

    What are your arguments for keeping the databases separate or for merging them? If you would like to keep them separate, I wouldn't create a database just to open the others, I would give the users shortcuts to each of the databases.

  9. #9
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Menus (2000)

    Hi Hans,
    Thanks for your help yet again. I have now finally completed everything.
    With regards to the databases being linked, what I would like to be able to do is have a central folder that the users will go in. In that folder will be a database that has a central form that then links to either of the databases. From a user point of view I would like the database to be called 'Casebuilding' with 3 controls, Control 1 links to Committals Log, Control 2 links to Briefs to Counsel, Control 3 is an exit control.
    I would like it this way mainly to try and encourage all the technophobes at work that have got to change their working practices to suit these databases. I think that this would be the best way to do this, with a central form that links to both cases so that the user can do all their work in one sitting.
    Also on a technical term, I presume Access is able to cope with mutiple users at the same time. The databases are in a public drive that the whole office can use, although maximum, it would only be between 2 or 3 users at any one time. They were originally in Excel which I found to be slow. Plus only one user could use it at a time.
    Thanks for all your help recently, it has been a god send.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Menus (2000)

    Access is a multi-user database. You can specify how it handles two users trying to edit a record at the same time: open a form in design view, and activate the Data tab of the Properties window. The Record Locks property has three settings:
    <UL><LI>No Locks: two users can edit the same record at the same time. When the first user leaves or saves the record, changes are saved; when the other user tries to leave or save the record, (s)he is notified that the record was modified by another user, and given a choice: save the changes (thus overwriting the modifications by the other user), cancel the changes (thus keeping the modifications by the other user) or copying the changed record to the clipboard so that it can be pasted into a new record. This setting is OK if there is little chance that two or more users will attempt to edit the same record simultaneously.
    <LI>Edited record: if one user starts editing a record, others can only view it, not modify it, until the record has been saved. This is the best setting to avoid conflicts if two or more users will frequently attempt to edit the same record simultaneously.
    <LI>All records: if one user starts editing a record, ALL records in the form will be locked for editing. This is rather draconic.[/list]

  11. #11
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Menus (2000)

    Hi Hans,
    Thats great.
    What would be the best way with reference to my other question. I still feel that a central control point would be beneficial to the users. How would I then link this to the appropriate database, I've tried a Run Application control but this does not work. I thought from there, the application of exit on each database would then take you to the central form that links the two databases and then exit from there fully.

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Menus (2000)

    The code behind the command buttons could be

    Private Sub cmdOpenDatabase1_Click()
    OpenCurrentDatabase "serversharefolderDatabase1.mdb"
    End Sub

    Private Sub cmdOpenDatabase2_Click()
    OpenCurrentDatabase "serversharefolderDatabase2.mdb"
    End Sub

    with the appropriate names substituted, of course.

    You could have a command button on the central form of each of these databases that reopens the "startup database" in the same way.

  13. #13
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Menus (2000)

    Hi Hans,
    Slight glitch in the coding............I've had to do it in such a way because our server is online so the coding is:

    PrivateSub cmdOpenDatabase1_Click()
    Application. FollowHyperLink "P:Trials Unit CasebuildingDtblinkedDtbListCom&BriBriefs to Counsel.mdb"
    End Sub

    This works fine, the problem I'm having is the exit on the forms do not work how I would like them to, I presume that they need a close Hyperlink command in their coding or another Hyperlink to the original form, plus a close command on the database. I would like the exit buttons to take me back to FrmCasebuilding and total close the databases that have been Hyperlinked.

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access Menus (2000)

    If you use FollowHyperlink, the "calling" database will remain open, so if the "called" database is closed, the other one should be in the foreground again.

    You have to be aware that doing it this way will create two instances of Access; this is a large drain on resources. I still think it would be better to provide the users with two simple shortcuts, or else merge the two databases into one.

  15. #15
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Norfolk, England
    Posts
    744
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Menus (2000)

    Hi Hans,
    When you refer to shortcuts, in what sense do you mean. Do you mean that on each database you would have on the main form a control to link you to the other database. The idea that I had was essentially a switchboard type of form that could allow the user to navigate through the two databases with ease.
    Naturally I would be quite happy to merge the two databases. I'm not 100% sure how to do this though. I presume again that you would need a basic form in startup that links you to the FrmMain in both databases. Would I merge by creating another database and importing the data/format from both databases into one. The only thing with this is that there is coding and forms with identical names, i.e. TblMain, FrmMain, TblCaseworker etc, but if this will work that will be fine.
    I have to bow to your superior experience here and ask what the best direction would be.........and how to take it.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •