Search results

  1. J

    Export to Excel with File Browser

    Ah, yes, that is the code I am "familiar" with, pdx_man. But I prefer your first option, the DoCmd.OutputTo. It works very nicely and it doesn't require more code. Also, I prefer not to involve other object libraries (ADO), etc..., but you sure know your stuff. One question for you: Is it...
  2. J

    How necessary is this code?

    Thanks for bringing the Replace function to my attention. Indeed, it is available in 2k (which I am using and am not interested in being backwards-compatible to 97... but thanks for the tweaked procedure, SforSoftware). I also need to point out that this code is not my own, it is...
  3. J

    Export to Excel with File Browser

    Excellent! The only point I should bring up is that there needs to be some error-catching code in case the Cancel button is pressed on the browse dialog window (otherwise the VB debugger spits out an error...) Thanks very much! Why wasn't something like this made available for IMPORTING with a...
  4. J

    Export to Excel with File Browser

    Can anyone post some example code for exporting a table from Access as an Excel file with a file browser? Basically, I want to be able to browse for the path and use that string in the PATH part of the code below. Any help would be great. DoCmd.TransferSpreadsheet acExport...
  5. J

    How necessary is this code?

    I'm looking to find out how necessary the function is that replaces a given character in a string with another character (ReplaceG). I'm interested in compacting this code as much as possible without losing its functionality. As you can tell, this is part of the code for importing a spreadsheet...
  6. J

    list box with row values: 1-9999

    aha! yes, a "spinner," that's the word/concept i was looking for... is there a spinner control in access? and if so, how would i attach it to a text box?
  7. J

    list box with row values: 1-9999

    I'm trying to figure out how to have the default values for a list box automatically set by its row source from 1 to 9999. I'm assuming that by setting its row source type to "value list" and coming up with some kind of simple code for a sequence to denote a list from 1 to 9999, that would do...
  8. J

    check for empty/NULL value in controls

    OK. For anyone who searches for info in this post and wants the answer,... Use the IsDate function.
  9. J

    Problem with For...Next statements

    amazing. it worked. in fact, it works better than IsNull. The table I was using for my recordsource was completely empty, except for its column headers and one blank row. Using the IsNull or IsEmpty method, for some strange reason, I needed to put TWO blank rows in the table. THEN those...
  10. J

    DoCmd.PrintOut a report from a form

    Can anyone show me how to use the code DoCmd.PrintOut acPages, Me.TxtFrom, Me.TxtTo to print a report from a form?
  11. J

    Problem with For...Next statements

    IsDate?
  12. J

    check for empty/NULL value in controls

    it didn't: Error 2427 You entered an expression that has no value. and points to the line: If Me.AddDate = "" Then
  13. J

    check for empty/NULL value in controls

    I've got a recordsource that feeds the value of the control AddDate in a report. The recordsource is blank/empty/uninitialized/NULL. I want the result of the code below to spit out a pop-up message box that says EMPTY! but it doesn't work. The code is in the Detail_Format section of the report...
  14. J

    Problem with For...Next statements

    OK, I tried the debugging you told me about, and the most helpful aspect of it is the hovering over a variable part. I'm still having trouble with figuring out how to check the value of AddDate if the field has not been set to any value because its corresponding record is empty. So, instead of...
  15. J

    Problem with For...Next statements

    Thanks, actually I did not know about break points. I'll try that. In the mean time, I reasoned that the values are not what I'm expecting. For example, AddDate is not NULL. I don't know what the value is for a record that is empty that has been assigned to a control (text box), but the code...
  16. J

    Problem with For...Next statements

    Sorry I couldn't get back to you sooner, pdx_man. To answer your questions: 1) The types of controls I am trying to work with are text boxes and check boxes on a report. 2) AddDate is the value of a text box that will be given upon report generation using a record source that may or may not...
  17. J

    extract file name from path

    by the way (I'm using jfgambit's method because... I can understand it.), I had to add the following code on to get rid of the extension: 'gets rid of path File = Right(FilePath, Len(FilePath) - InStrRev(FilePath, "\", Len(FilePath))) 'gets rid of extension File = Left(File, InStr(1, File...
  18. J

    Problem with For...Next statements

    The following code works its way through some simple If...Else...EndIf statements and For...Next statements. Me.AddDate is Null. The result of running the code (with the MsgBox "markers") is that the following messages appear (in the order listed): 1) End Add True 2) End Add Checks 3) End Add...
  19. J

    extract file name from path

    Thank you very much for your assistance, everyone. (I am using 2000.) The InstrRev() function was the one I was hoping would be included in Access-VB, but I had only heard of InStr() at the time.
  20. J

    extract file name from path

    Is there a special function for extracting the name of the file from it's path and extension? (Or do I have to create a loop and check for instances of special characters such as "\" and "." in relation to their expected placement?) For example, I want to extract the name of the file "FILE" from...
Back
Top Bottom