Search results

  1. D

    Setup Form with Backup Button - Help!

    Restore Button Private Sub Button_Restore_Click() Dim frm As Object 'Close all open forms For Each frm In CurrentProject.AllForms If frm.IsLoaded Then DoCmd.Close acForm, frm.Name End If Next frm 'Open form F_Restore. Used to give tables time to close. DoCmd.OpenForm...
  2. D

    Setup Form with Backup Button - Help!

    Backup Button Private Sub Button_Backup_Click() Dim str As String Dim buf As String Dim MD_Date As Variant Dim fs As Object Dim source As String Const conPATH_FILE_ACCESS_ERROR = 75 On Error GoTo Backup_Button_Backup 'buf = Back Up Folder 'buf is created if it does not exist 'CurrentProject.Path...
  3. D

    Setup Form with Backup Button - Help!

    I think the mods deleted it. I'll post the code here today.
  4. D

    Delete/Undo code if no records

    Re: Delete/Undo code if no records - Solved Thanks. It works fine now. Private Sub Button_Delete_Click() Dim Msg, Style, Title, Response, MyString Dim Cancel As String If (Not Me.NewRecord And Nz(Me.IDTreatmentProblem, 0) <> 0) Then ....... Goto learn how to use NZ and remember to use it.
  5. D

    Delete/Undo code if no records

    Sorry, I had posted some more detail, but got disconnected and had to retype. The sub forms properties are AllowAdditions = No. The user has to click on New Record button to start a record. When selecting an item in the List Box in the main form, there may be no records in the sub form...
  6. D

    Delete/Undo code if no records

    Need help finishing this code please. Access 2k7. Existing record - Deletes (working) New record, dirty - Undo (working) New record, no data - Undo (working) No records - goes to "Existing record" Private Sub Button_Delete_Click() Dim Msg, Style, Title, Response, MyString Dim Cancel As...
  7. D

    Form Level Validation - Closing

    Re: Form Level Validation - Closing (Solved) Thank I got it now. Private Sub Button_Close_Click() Button_Save_Click DoCmd.Close End Sub Private Sub Button_Save_Click() Dim Cancel As String 'Code added in red Dim Msg, Style, Title, Response, MyString If Me.NewRecord Then Msg = ("You...
  8. D

    Form Level Validation - Closing

    I am using Form Level Validation and all works well except: When adding a new record the user is prompted if they would like to add a new record or not. Cancel works fine. If OK then a new record is created and the user can enter details. The problem comes in if they then decide not to add...
  9. D

    Lookups at table level

    Thanks. All works now.
  10. D

    Lookups at table level

    Having problems with that. Had a look at some of the posts re form validation. Will post a thread in Forms.
  11. D

    Update Combo Box with Requery

    Why not add a Not In List sub? That way the user can add what they want. If it doesn't exist it will ask them if they wish to add it. The list form doesn't open and the new item is auto selected. Private Sub ComboName_NotInList(NewData As String, Response As Integer) Dim db As DAO.Database...
  12. D

    Create a Form That updates one table and inserts edits into a new table

    Two Tables with the same fields Second table can include a date/time/user stamp Two Forms based on the two tables. Form1 is the input form (the one the user sees) Form2 is where the edits are written. It has one (or more) extra fields that date/time stamp the edit. Private Sub...
  13. D

    Lookups at table level

    The DB will only be used as ACCDE with Access Runtimes (if use does not have Access 2K7+). Dont think I will go the SQL Express route. Too much of an install. It is mainly for assigning mulit recomended treatments to a medical problem. When recording the actual treatment they are not used...
  14. D

    Lookups at table level

    Tested removing the lookups and it works fine. What about when I need to use Allow Multible Values(Access 2K7)? Example: T_MedicalProblem IDProblem MedicalProblem (no dup's) RecommendedTreatments (Multible Values, from ProductName) T_Treatment IDTreatment ProductName (no dup's)...
  15. D

    Security on a Form

    Password protect the BE - stops users from creating their own DB linked to the BE data. Make the FE an accde, mde or accdr Do not install Access on users computers, instead distribute the DB with the FREE Access Runtimes. (This also reduces license costs)
  16. D

    Lookups at table level

    Found this interesting and would like some info. Is this bad practice? How would this affect my DB? Any useful comments please. I have a table that has lookups. T_Animal IDAnimal AnimalNumber (Indexed No Dup's) AnimalGroup (Lookup) AnimalSex (Lookup) AnimalBreed (Lookup) AnimalOrigin...
  17. D

    Open database to different form

    You can also change the Startup Form in VB. CurrentDb().Properties("StartupForm") = "Form_XYZ" Example: You have one main menu You have 2 different departments. Each department has its own menu Finance Menu = Ledger, Payments, Invoices Sales Menu= Orders, Quotes Sales doesn't need to...
  18. D

    How to format Input Box Date

    Assume Letterdate is an unbound TextBox. Set the roperties of Letterdate to ShortDate
  19. D

    Sorting Memo fields

    Oen the Table in View mode. Go to the column that has the Memo Next to the column lable is a down pointing triangle (slipped my mind what they are called) Click on this down pointing triangle Use one of the options (AtoZ, ZtoA)
  20. D

    MoveSize property help

    docmd.MoveSize(Right, Down, Width, Height) or Use the forms as subforms of a form
Back
Top Bottom