Search results

  1. H

    Limited on number of import files

    Do you import the files one by one? Have you tried closing or clearing the variables that point to the excel files before you open the next file?
  2. H

    Here is a Users And User Groups Example Database

    I've been working on an example database to demonstrate how to program your own Users and User Groups module. Feel free to download and test this database and then post your feedback here. This was written for Access 2007 and 2010 but the file format is 2002/2003. You should easily be able to...
  3. H

    Data Owner & User Access Level Security

    This gets really complex quite quickly. Do you want the user to log in at that start of the app or for every screen they go into? Do you want users to be able to be in more than one group like Windows Server allows? I don't recommend this. What all would you expect to apply these permissions...
  4. H

    Store asterisk or question mark in database

    Looks like I posted too soon. Everything appears to be working fine. I think it was a different bug of my own.
  5. H

    Store asterisk or question mark in database

    I'm trying to store short text records that sometimes include a question mark or an asterisk. I need the ability to do SQL related searches like DCounts and DLookups but I can't seem to get it to work. Is there some easy way around this? Some way to escape these characters?
  6. H

    Saving record and clearing form

    As is obvious, I was a little late posting. My idea still applies. You just need to put the GoToRecord code in the function SaveFormData, or whatever other code you want in there.
  7. H

    Saving record and clearing form

    To do what you're trying to do I would normally create a sub or function on the "other form" (the one you want to do a save on) that handles the save and then call it from your first form. Public Function SaveFormData() DoCmd.RunCommand acCmdSaveRecord End Function 'I'm assuming you want...
  8. H

    Reuse code in Module

    You can compact and repair with this code: Call CompactBackendDatabaseFile_Custom(CurrentProject.Path & "\Data\Farm_1.accdb", CurrentProject.Path & "\Data\Farm_1Temp.accdb", False, False) Call CompactBackendDatabaseFile_Custom(CurrentProject.Path & "\Data\Farm_2.accdb", CurrentProject.Path &...
  9. H

    Reuse code in Module

    BTW, I hate to be pessimistic but I can't see where this procedure is ever going to be of any value. How do you expect the files to suddenly disappear? It's far more likely that your users will have database corruption in which case this procedure won't help at all because it will find the files...
  10. H

    Reuse code in Module

    I changed your Function to a sub. It doesn't return any value so it doesn't need to be a function. Private Sub Form_Open(Cancel As Integer) Call CheckFile("Farm_1.accdb") Call CheckFile("Farm_2.accdb") Call CheckFile("Farm_3.accdb") End Sub Sub CheckFile(FarmFile as String) Dim...
  11. H

    Queries based on listbox

    First off, I recommend you rename your controls to something logical. List112, Combo58, Combo60 are terrible names. Try something relevant like lstCourses, cboBackupCourse1, cboBackupCourse2. Secondly, it looks like you're leaning to much on code to try to determine what choices are allowed and...
  12. H

    vba multiple for loops

    I've read through your post and your code and it's still not very clear to me what you're trying to do. What is "SampleAction"? Is that a table? Is it the same table your datasheet form is bound to? Here it looks like you are referencing a value on your form: If IsNull([carbon_chk]) = False...
  13. H

    vba multiple for loops

    This is a simple logical error. You are setting the value of your SQL statement before you set the values in your variables. I initially posted an example of how you should do it but I then realized that it still contained a logical error. I'm going to have to reread your post to see what I can...
  14. H

    Access 2007 Error: Compile error: User-defined type not defined

    What Bob Larson is telling you is most certainly true. Late binding does make programming a little more difficult though since you won't have intellisense to help you out as you try to determine how to access certain properties. I also have code that uses Outlook to send emails but I always use...
  15. H

    Time From & To Calculator

    You'll have to store the date too, even if you store it in a separate field. ([Date2]+[Time2]) - ([Date1]+[Time1])
  16. H

    Syntax with quotations

    Yeah, it's basically a WHERE statement minus the WHERE. This same thing is true if you ever use DAO's FindFirst method. rst.FindFirst "FirstName = '" & John & "'" If rst.NoMatch = False Then 'Do Something End If
  17. H

    Making a switchboard open on startup without without the backend

    It would probably be best to split it, especially if you will have multiple users using the file. However, I don't think that is what's causing your security error.
  18. H

    Syntax with quotations

    any time you are using sql statements to reference values in a text field you have to surround the given text parameter with single quotes. So the actual value you are passing in actually looks like this: [UserID] = 'JohnDoe'
  19. H

    Data Owner & User Access Level Security

    Sounds like you just need to create a UserGroups table and then a Users table. Make sure each user gets assigned to a UserGroup. Then you'll have to determine which access level takes precedence but it's usually recommended to stick completely with group level security instead of assigning...
  20. H

    Making a switchboard open on startup without without the backend

    not sure right off. Is the database split? Do you have the backend in a trusted location? You might need to change your trusted settings inside the Access options.
Back
Top Bottom