Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: djmc
  • Order by date
  1. djmc

    Execute VBA code upon quitting application.

    The Autoexec macro is a special macro which is executed automatically whenever the database is opened. Therefore I juse include the RunCode action within the macro to call my VBA code. As I was saying before, I am looking for something similar except executing before the application closes.
  2. djmc

    Execute VBA code upon quitting application.

    There are no application events in Access? But I've used the AutoExec macro to execute VBA code at the start when MS Access loads. So I thought that there should be a macro of some sort that executes VBA code before the application closes.
  3. djmc

    Execute VBA code upon quitting application.

    How do I get my ms access application to execute vba code when the application exits? (i.e do something before exiting)
  4. djmc

    Import Specifications in MS Access

    Suppose my CSV file forms a table like this: COL_1,COL_2,COL_3 a,b,c d,e,f I want to import the csv file into the following table structure in MS Access: COL_2 | COL_1 | COL_3 ---------------------- b | a | c e | d | f ---------------------- How can I create a specification...
  5. djmc

    Importing .sql files over to an Access table

    I have an .sql file which is about 75MB in size. It consists of INSERT statements with the values I need to import into an Access table. Is there an easy way to import this on the fly like via a DoCmd statement or should I just parse the file line by line and execute these insert statements to...
  6. djmc

    Export in CSV format with DoCmd.OutputTo

    I did the following: DoCmd.TransferText acExportDelim, , strName, strExportName, True but it won't prompt me for where I want the file to be saved (since i specified a filename). Is there a way to get the window to pop up along with my default file name shown in the window?
  7. djmc

    Export in CSV format with DoCmd.OutputTo

    I would like to know how I can export to CSV format using the DoCmd.OutputTo function in VBA. I know how to do it in .xls format but not .csv. As well I know that when a file name is not specified in the arguments, a window will popup asking you where you would like the file to be saved in. How...
  8. djmc

    Accessing excel spreadsheet via MS Access

    Here is my current situation: - Creating an Access app which relies on a series of Excel spreadsheets, each of which contains serveral worksheets. - Given a form, user inputs a set of values, these values are then used to query the set of worksheets within the spreadsheets and generates a set...
  9. djmc

    Date arithmetic with specific format.

    Okay, I parsed out the date from a file which has NO relation with the date formats in VBA or whatever. Tue Aug 24 21:00:00 2004 <-- taken from a data file, and inserted into the MS Access db table (that is only one of the files in the record) All I want to know is if there is a format in VBA...
  10. djmc

    Date arithmetic with specific format.

    I am getting data from a field which contains this Tue Aug 24 21:00:00 2004 I translated it to Tue 9:00 PM in VBA. i.e Wed 1:00AM - Tue 6:00 PM returns 25200 because theres a 7 hour difference between them, hence 7*60*60 = 25200 secs. Basically I would use DateDiff("s","Tue 6:00 PM", "Wed...
  11. djmc

    Date arithmetic with specific format.

    Hello, Suppose I have Tue 9:00 PM I want to do a subtraction and return the number of seconds. i.e Tue 9:00PM - Tue 6:00 PM returns 180 Also consider rollover i.e Wed 1:00AM - Tue 6:00 PM returns 25200 Thanks.
  12. djmc

    Subtracting two times.

    I just found out that I could utilize DateDiff(), DateAdd() however I want to know how to add days as well.. i.e Sat + 1 -> Sun, Sun + 2 -> Tue Thanks.
  13. djmc

    Subtracting two times.

    Let's say I have some data I parsed. And the time format is the following: hh:mm:ss (24hr format) i.e 15:13:09 I want to subtract the two times and get an overall duration value. i.e 10:00:00 - 9:30:00 = 00:30:00 or something of that nature.. thanks.
  14. djmc

    Working with Collection object

    I am getting the following error: Invalid procedure call or arugment. Error #5
  15. djmc

    Working with Collection object

    Here's the actual function, it just returns the collection. I just want to know how to deal with nonexistent keys (instead of being prompted with an error i want to assign an empty string) i.e someVar = myCollection("12312") someVar would be "" Private Function getLookupTable(ByVal strType As...
  16. djmc

    Working with Collection object

    Hello, I have a function which contains two different collection objects. Given the name and key it will return the value if it exists or nothing if it doesnt. However, VBA prompts me with an error if we attempt to retrieve the value with a non existent key. I was wondering how to get around...
  17. djmc

    Split function in VBA for Access 97

    I am trying to convert my Access 2000 mdb to 97 and run the modules and found that there are some problems with using the split() function. Its telling me that it doesnt exist. Do I have to implement my own Split() ? Thanks.
  18. djmc

    How to refresh Progress Bar while reading records

    Never mind, fixed it. I accidentally used Application.Echo False and True.
  19. djmc

    How to refresh Progress Bar while reading records

    Hello, I have a function in a module which executes to do stuff while reading a record set. It also opens a form which shows the progress of the record reading, however it is not refreshing until records have been all read. Public Function fCheckRating() Dim db As DAO.Database Dim rst...
  20. djmc

    Creating a Collection through assignment

    Thanks, that helps. I have another problem now. Let's say I attempt to lookup something that is not in the table, I want to be able to set my variable to "" if it fails to lookup a value from the given key. However, VBA chooses to prompt an error to me. I was wondering how I can catch the...

Part and Inventory Search

Back
Top