Search results

  1. J

    Linked tables

    Currently I have a script which changes my linked tables from one location to another and it works well. The problem I have is that I have a table in one back end named Orders and I linked it into my other database and changed it's name from Orders to AdminOrders, as we already have a table...
  2. J

    calculate hours excluding weekends

    I found the following function on the net to calculate hours between 2 dates (EXCLUDING WEEKENDS). The problem I am having is that it is returning 44 hours between the following dates where it should be 20-21 hours. StartDate: 29/04/2016 2:54:53 PM EndDate: 2/05/2016 11:18:21 AM Looking at...
  3. J

    run a macro in another database

    I am trying to run a macro in a password protected database, however the script doesn't actually enter the password in the password section so unless I manually key it in I can not open it. The password is correct. Sub Test1() Dim app As Access.Application 'Start a new MSAccess...
  4. J

    copy forms and modules from one database to another

    I am trying to copy a form from one database to another PASSWORD protected database. The following will open the database but I get an error as the file already exists. Runtime error 2007 - you already have a database object named frm_Utilities. I tried the Docmd.transfer method but it always...
  5. J

    Delete form from another password protected database

    I have been searching for a script to delete a form from another password protected database and I have found scripts to delete tables but not forms.
  6. J

    List Loaded forms and subforms

    I have the following script which lists loaded forms and the controls sources. What I would like is to list the loaded forms and there subforms control sources. Public Sub ListOpenFormControls() ' Read control source property of all controls in all forms. ' Note.. the debug window may not be...
  7. J

    form textbox date field - have to double click

    I have a textbox on a subform which is a date picker textbox. On the main form is a back button which takes you back to the previous form. When you manually enter a date into the date picker textbox on the subform you can click on the back button and it will take you back to the previous form...
  8. J

    Referenced database for not found

    I referenced another database in the references and then when I first opened a form from the referenced database it opened, but once I closed the database and reopened I keep getting an error 2102 the form name is misspelled or doesn't exist, yet it clearly exists. I have removed the reference...
  9. J

    Create Shortcuts

    I am trying to use the following script to create hundreds of shortcuts. However I am getting a runtime error 5, invalid procedure If I remove the TargetName from the line that errors and use "X:\Master Front Ends\TheBrain JT.mdb" it creates shortcuts, but obviously they would all have the...
  10. J

    Access Office 365

    My boss wants us to upgrade Access on our terminal server to Office 365, however it doesn't support the current version we are using which is 2010. Does anyone have any suggestions on an easy way to transition from 2010 to 365 (other than don't bother). I tried a similar exercise in converting...
  11. J

    move subform of subform

    I often move sub forms up and down within a form using something like. forms!MyMainForm!MySubform.form.top = 500However, I am having trouble moving a subform within a subform of a form. Forms!MyMainForm!!MySubform!MySubformSubForm.form.top = 500
  12. J

    set default alternate row color

    Is there a way to permanently set the alternate row color in access, so that whenever you create a form it will always be what I want. I know that I can make a template and always use the template, but I would prefer to just change the access settings if that is an option. I checked the access...
  13. J

    Convert Linked Tables to local

    I have the following script that either converts a single linked table to a local table or ALL linked tables to local tables, however I am getting the following 2 error messages on several tables for the ALL tables script. error 3709, the search key was not found in any record Error 3300...
  14. J

    List Query name and expression

    I have the following script which lists the query name and it's field names. I also want to list any expressions in the field names but am not sure how to achieve it. i.e the expression in a field of one query is. Desc: [PMatCatDesc] & " " & [SMatCatDesc] & " " & [SizeDesc] & " " & [ColDesc] &...
  15. J

    string to return textbox sum

    I have a textbox on a subform and I want to get the sum in a string as follows. Dim s1 As String s1 = Sum(Forms!CountItem!CountItemLastCount.Form!ThisCount) MsgBox s1When I use the above I get an error message saying - Sub or function not defined and it highlights the sum part of the...
  16. J

    importing objects from secured database to clean database

    I have an access database that was set with security about 10 years ago. I have now created another database in 2010 and I am importing all the objects to make a clean non secured database. When I import tables it imports system table objects like MSysRelationships, but as it already exists it...
  17. J

    set currentuser

    I have the following script which sets the currentuser, however it clears currentuser when I open the database and I don't want this, I want the currentuser to be there and it only changes when I want it to change. I.e. when the database opens if no value is found in my table then the name...
  18. J

    Removed security - not have issues

    I am using Access 2010 and I removed the Admin password and now when I open a database I get a message like you do not have necessary permission to us the X;\Jobs_2002_be.mdb' object How do I fix this, as when I log on to a different database I then get a message saying record(s) cannot be...
  19. J

    Change currentuser

    I know that people are going to want to attack me for this question, if that is you, then please just move on. I want to know if it's possible to change the currentuser temporarily using code. Why? Because I am moving away from the security and just having a logon database which copies a...
  20. J

    sort a listbox

    I have the following code to fill a listbox with file names. I can not get it to sort it, I found a script but it errors on .list Fill the listbox Me.Listbox1.RowSource = "" Dim MyFolder As String Dim MyFile As String 'Dim j As Integer MyFolder = "C:\dbase" MyFile = Dir(MyFolder &...
Top Bottom