Search results

  1. K

    Run-time error 2507

    Wow! Something so simple, and that was the answer. I did a search on the error, but didn't come across this one. Even though Microsoft says "Microsoft Access" is the default, it evidently isn't. I simply changed the DoCmd line to the following: DoCmd.TransferDatabase acExport, "Microsoft...
  2. K

    Run-time error 2507

    Hi Gina, I actually use UNC paths instead of the drive letter in my code, but changed the text in the code provided in this thread for simplicity (and because my company doesn't want internal server names/paths disclosed). The line that highlights when it errors is the DoCmd.TransferDatabase...
  3. K

    Run-time error 2507

    Hi CJ, yes, I've stepped through the code, and everything works great until the transferdatabase command. All directories and files exist, or are created if they don't exist.
  4. K

    Using Exit Sub

    MarkK, I don't believe the OP is talking about the scenario you describe, and I know I'm not. Instead, it's a situation wherein criteria are met or not met prompting the need to exit the sub rather than continue running the sub. For example: If Something Then Exit Sub End If Do other...
  5. K

    Using Exit Sub

    As you indicate, some may consider this 'bad form', and if they do, I'd be curious to hear about it. I do this all the time. When I do, I simply try to ensure I close any open recordsets, set things to nothing, and set warnings back to true. Again, I'm curious to see if anyone has reasons to...
  6. K

    Export to excel with variable filename based on query result

    Are you writing this in vba or creating a macro?
  7. K

    Run-time error 2507

    Hi all, I have a situation that has me puzzled, and I'd like to see if anyone has any suggestions. I have an Access database that runs daily, and periodically needs to archive certain tables. I'm trying to write the vba code to do so, but I'm getting Run-time error 2507 - "The type isn't an...
  8. K

    VBA to read Outlook email messages in Win8

    Thank you vbaInet. That works. Sorry about posting in the wrong forum. I didn't know there was a VBA Outlook forum. My VBA code is in Access, so I thought this would be an appropriate forum.
  9. K

    VBA to read Outlook email messages in Win8

    I wrote VBA code to pull email messages from Outlook in order to create an alert if a message with a specific subject line is not received. I have the system coded to send the alert if the message isn't found before the system encounters a message with a SentOn date/time more than two hours old...
  10. K

    Date and Time Functions not using current info

    Hi all. I'm sorry, I was offline over the long US holiday weekend, so I'm just getting back to this. It's as Gina indicated. My new associate named a field "Date" and another field "Time" in the table that was being used as the Record Source for the form. Therefore, vba was looking to that...
  11. K

    Date and Time Functions not using current info

    That is exactly right. Thank you.
  12. K

    Date and Time Functions not using current info

    I tried changing the date in the table, and, as you suggested, the date in VBA changed accordingly. Therefore, although the table was not being called in VBA as a recordset, or anything else, for that matter, Date() and Time() in VBA was pulling it from the table (the fields were named "Date"...
  13. K

    Date and Time Functions not using current info

    I have several routines that run throughout the day, and there are different actions that are taken at different times of the day. I simply use Time to determine the current time when the routine is run to see which action to take. Here is a sample: Dim AssignBeginTime, AssignEndTime As...
  14. K

    Date and Time Functions not using current info

    I have done a search of the whole project for date, but not time yet. I don't see anything out of the norm with date. Unfortunately, I don't know what you mean by "direct-pane", but I don't see anyplace where he has set date or time as anything else. Following-up on something GinaWhipp...
  15. K

    Date and Time Functions not using current info

    Yes and no. Here are the test cases and my results: MsgBox I create a Form, add a button with an On Click Event Procedure. In the Private Sub called by the Event Procedure, I add the following code: MsgBox "Now: " & Now() & vbCrLf & "Date: " & Date & vbCrLf & "Time: " & Time() The result...
  16. K

    Date and Time Functions not using current info

    Hi vbaInet, I hope you've hit on something, and have an idea about what is going on. I've been looking at this using queries, msgbox, and by stepping through the code. When I look at Date() and Time() via msgbox, 5/27/2014 and 7:16:35 AM are displayed, and Now() displays the current system...
  17. K

    Date and Time Functions not using current info

    I'm confused. What tables would Time() and Date be pulling from? I thought those functions pulled the data from the current system date/time, not tables. When I create a brand new Access database, with no tables at all, I can write simple VBA code to pull current date, time, and now...
  18. K

    Date and Time Functions not using current info

    Hi Gina, Thanks for the quick response. I don't think it's old data because the Now function shows current date/time and Date and Time functions work correctly in queries. I figured he changed something while "tinkering" but I can't see anything that would cause Date and Time to produce...
  19. K

    Newbie from Chicago

    Hi all, I'm new to the forum, at least as a registered member. I've used the forum many times in the past, but have finally decided to register and start posting questions. I've been coding in Access for about ten years, but I'm definitely not an expert, so I anticipate asking more than I...
Back
Top Bottom