Search results

  1. C

    ? Count specific character in FIELD

    Well if it was me I would... '----------------------------------------- Private Function CountChar(StringToSearch As String, CharToSearchFor As String) Dim i As Integer Dim intOccurances As Integer Dim intCharLength As Integer intCharLength = Len(CharToSearchFor) For i = 1 To...
  2. C

    Creating Tables in code

    Here is your code: '----------------------------------- Public Sub CreateTable() Dim strTableName As String strTableName = InputBox("Enter new table name:", "Create New Table") If Len(strTableName) > 0 Then DoCmd.RunSQL "CREATE TABLE " & strTableName & " (Item TEXT (100), Price SINGLE,Unit...
  3. C

    making VBA wait

    When the True condition is met, have it set the timer interval value to 60,000 (one minute). Have the timer event increment a global variable by '1' (starting at 0) every time it executes (adds one to itself every minute). Have an If statement at the end of the timer event check to see if your...
  4. C

    Executing a module from another DB

    You cannot open a module that is in database B from within database A. You will have to copy the module from B to A then run the needed procedure from A as any other local procedure. Darrin@CB69
  5. C

    How to delete weekends

    For anyone interested, here is the VBA solution to the original problem. One form, three text boxes (StartDate, EndDate and WeekDayCount). All code goes in the form's module: Option Compare Database Option Explicit '-----------------------------------------------------------------------...
  6. C

    Curiousity?

    i think that this is what you are looking for???... You can call any public function or sub procedure from within any other procedure. You can call any private function or sub procedure from within any other procedure within the same module as the prodedure that you wish to call. You do this...
  7. C

    How to delete weekends

    csr, What you are requesting can be accomplished with a query, but it takes some fairly advanced SQL knowledge to do it. If you would be willing to e-mail me the table that the query is to be based upon, I will create the query for you. My e-mail address is: dahuit@qosi.net Darrin@CB69
  8. C

    Get username and computer name

    excellent, thanks!
  9. C

    Get username and computer name

    Anybody know how to access the name of a user's computer and their network logon name using VB/VBA? Darrin@CB69
  10. C

    Next Record button

    Yeah, but you could skip all that and just set the form's Allow Additions property to No Darrin@CB69
  11. C

    How can I enter this default date?

    Good call John, I forgot about that. Thanks. Darrin@CB69
  12. C

    How can I enter this default date?

    Here, try this; Create a module in your project and insert the following code: '-------------------------------------------- Public Function FirstOfNextMonth() As Variant Dim intDay As Integer Dim intMonth As Integer Dim intYear As Integer Dim varNextMonth As Variant intDay = 1 intMonth =...
  13. C

    assign data to a combo box that is attached to a table

    Why not just use the combo box's default value property instead? Darrin@CB69
  14. C

    Open a database with VBA

    I have two databases which store related data. I would like to open one database from the other using VBA (don't ask why). If possible, I would like the user to simply click a command button on a form in database 'A' which triggers database 'B' to open. The trick is I want database 'B' to...
  15. C

    Entering info to forms

    ...and if all else fails, there is detailed information about this problem in your Access Help files. Look up the topic (or ask your Office Assistant) "When can I update data from a query?". I'm using Access 97 so other versions may be a little different. Darrin - CB69
  16. C

    Do not add record

    I haven't tried this, but it should work. Try using this code where the user selects to not save the new record: SendKeys "{ESC}" 'Clear current field SendKeys "{ESC}" 'Clear current record DoCmd.Close Darrin - CB69
  17. C

    Transfer Database

    Why don't you just use a linked table instead?
  18. C

    basic internal functions not working

    Thanks Mike. I've got it working correctly now. Turns out it was an missing reference to an unused ocx file that was not installed on the other computers. Not sure how that would effect it, but deselecting it cleared up all problems. Thanks again Darrin - CB69
  19. C

    basic internal functions not working

    I have created a complete and fully functional Access database using MS Access 97. When running the application on the computer that I created it on, everything works great, no problems. However, when I run it on any other computer, errors occur when it tries to execute certain basic internal...
  20. C

    Search Field

    Here, try this: http://www.geocities.com/airwalker08/Search4Stuff.htm jabrum, I know how to do the check that you are looking for. I have built a database that does just that but it will take some time to make a small working example like the one at the above link. Check back later, maybe...
Top Bottom