Search results

  1. D

    Reuse code in Module

    Thanks it works great. Now I just need to find a Compact & Repair code that works with 2007. I need to have the code run for all 3 files. Currently the code quits the app after restoring a single file and the user needs to reopen the app manually. The app is designed to share data between farms...
  2. D

    Reuse code in Module

    I have a startup form that calls 3 function Private Sub Form_Open(Cancel As Integer) Farm1File Farm2File FarmsFile End Sub These check that the 3 BE files exist. The Module is as below, but has 3 identical functions. Only the blue text is different: Function Farm1File() Dim Msg...
  3. D

    Compare two tables

    You want to use a form to display the info you want, not a table. Tables store the raw data. Tables/Queries/Reports assemble the data. Table1 - Employee details EmloyeeName (PK) EmloyeeAddress EmloyeePhone Table2 - Key card numbers. Employees loose/break cards. You want to match a card to an...
  4. D

    Creating dates in a table automatically

    To add to a table you can use the following code. The fields in blue need to be changed. As far as the [FirstDate] and [LastDate], using code like DCrake in combo boxes will work. Or, better still, code that runs everytime the db opens that adds the next weeks dates in automatically. I have an...
  5. D

    Combo Box Sort by Current Date

    Missed that. Sorry. I should have explained a bit better. I have a table that has Date and Sold. The query for the table has Date, Sold, YYMM The combo box query used the table The query for the combo box is MMYY, YYMM Sorted by YYMM decending The combo box is in the header of the main form...
  6. D

    Combo Box Sort by Current Date

    I have a simple method. In the query for form I add a field (order1) that assigns a value of 1 if date1 = Date() or 2 if it doesn't. The field is sorted Assending. Order1: IIf([Table1]![Date1])=Date(),1,2) This makes 1 the first record. Then in the form load procedure I add the following...
  7. D

    comment calculer entr deux limite dans access 2010

    Well there's the problem. You let the Aussies and Kiwis in. What about us Saffers? ÉLEVÉS = pupils or students I think the OP want a formula that calculates how many pupils have a average between 0 and 4.99 and how many have an average between 5 and 9.99 So the question is: I have a field in...
  8. D

    Question What Access and Other Programs are needed

    Sorry I should have said DEVELOPER. Here is the link. http://msdn.microsoft.com/en-us/office/bb229700 You need to download both Runtime and Developer. Installing Developer and you will have the option in the menu. See the 2 screenies.
  9. D

    Running exe inside Access

    Answer: Morris dancing Sorry couldn't resist Try the following: Dim stAppName As String stAppName = "C:\Program Files\ABCedit\abc2ps.exe D:\MyMusic\ABCmusic\Braybrooke.abc" Call Shell(stAppName, 1)
  10. D

    Question What Access and Other Programs are needed

    Check the link in my signature. It tells you all about Access 2007 Runtimes and Deployment Tools. They are now free for 2007 and 2010. So choose your weapon of choise. Runtime (as you know) allows the app to be run on a computer without the need for Access or if the computer has a "lesser"...
  11. D

    not save information

    Set the form properties to Allow Additions = No On the form have a button to add a new record Private Sub Button_New_Click() Dim rst As DAO.Recordset 'Allows you to add a record Me.AllowAdditions = True 'Creates a new record and goes to the first field Set rst = Me.Recordset...
  12. D

    AutoLink databases

    The code first closes all open forms. This "releases" any links that the forms may have to the tables. Next it removes the linked tables. Lastly it relinks the tables. 'Close all open forms Dim frm As Object For Each frm In CurrentProject.AllForms If frm.IsLoaded Then...
  13. D

    Access control.

    In the table that contains the user accounts add a field for permissions. i.e. 0= No access, 1=Read only, 2=Read + Add, 3=Read + Add +Edit......... In the code for the button to open a form, use an if statement to allow opening. If [UserPersission]>0 then DoCmd.OpenForm "Form1" Else msgbox "No...
  14. D

    using access 2003 runtime

    The good things are: You can use 2007 or 2010 to create your app. Work in an environment you want to. Always make the app an .accde then rename to .accdr Runtimes are free The deployment tool works well and is very easy to follow Your app looks so much more professional I suggest that the...
  15. D

    age today from DOB

    The following code gives the accurate Years, Months and Days between two dates. Today = Date() Date of Birth = [DOB] The code can be used in a query or directly in an unbound field in a form. Years IIf([DOB] Is...
  16. D

    using access 2003 runtime

    Convert the app to 2007 Deploy using the FREE 2007 Runtime and Deploy tools form Microsoft. See my sig for full info.
  17. D

    How do I refer to a control in a subform, nested in another subform?

    Ok, here is a little trick that works quite well. Open the form that contains the nested forms in design view. Now create a new blank query. No need to add any tables. Now go to the field and select Build wizard. In the Expression Builder select Forms then Loaded Forms. Keep drilling down...
  18. D

    Turn Ribbon back on when opening report.

    I've been off for a few days. I did get it to work.... But ... I see the code relies on closing the form that has the links to the reports. I may need to rethink this form as the user may want to preview another report after rinting and I don't want them to mave to go back via the main menu...
  19. D

    Moving MDB to another domain

    It will take about 5 minutes to split the db and compile it as an MDE. Then rename the mde to mdb so as not to loose shortcuts. Users will not be able to edit it. MDB is dangerous as users can change it. This may solve the problem.
  20. D

    Turn Ribbon back on when opening report.

    Note the screen shot. I dont want a ribbon at all except when previewing a report. Avelino frist samle db worked when opening the report from the main window, but not for a report (popup/modal) opened from form (popup/modal) opened from the main form (not popup or modal) . @ Avelino - sample R1...
Back
Top Bottom