I think I have come up with a work around...
I am now checking to see if the new file that I want to create already exists. If so, I do not make the copy but rather inform the user that the file exists and it must be deleted before the procedure can continue. This should eliminate any errors...
I would rather not resume next if possible. There are four lines of code - three that copy the file to a new location and a final line that deletes the origional file. If I cannot complete these three copy commands, I do not want to delete the origional file.
Is there anyway to check and see...
I have a function that renames and copies files from one directory to another. Here is a sample of the code
'Set sNextFile to a PDF File in source_directory
sNextFile = Dir$(SOURCE_DIRECTORY + "*.PDF")
On Error GoTo errNext_File
Loop_Start:
'Loop Until all Files in source_directory are read...
If I'm not using DlookUp...
I have a table that I am liked to via ODBC and have opened as an ADODB connection. Each row has a unique key called a SeqNo. I would like to run a SQL command that would search by SeqNo, and then insert the value of one of the columns retuned into a variable that I...
I am having a problem with the DLookUp function. I am using this function to pull a field from a table into a variable, but first I would like to check to make sure that the data I am looking for is in the table. I am doing this by evaluating the return value of DLookUp via an If statement...
I have a VBA program that I wrote in access. My question is this: Is there anyway to eliminate or minimize the main Microsoft Access program window so all the user would see is my forms and the desktop? Not that ugly gray back drop? Thank you in advance for your help.
-Rob
I have a directory where I store the latest version of various PDF files. The files are moved to this directory via the FileCopy function. I am having a problem where if a file exists in the latest version directory (ie: c:\latest_files\file1.pdf) and a newer version is created...
I have a text box in one of my reports that I would like to have in a Long Date format. Right now, it gets it's info from a text box on a form like so:
report text box = CDate(Forms!frmApplicationReports!txtStartDate) & " to " & CDate(Forms!frmApplicationReports!txtEndDate)
The date being...
Dialog box acting weird/Not closing
I have the following line of code in a module to open a dialog box:
Do While rstCBAPPS.EOF = False
If rstCBAPPS.Fields("ACAP No") = Val(strACAP) Then
'Open error dialog with error message
strErrorMessage = "Duplicate Found! Press Cancel...
I would like a form I have created to check the value of a text box upon loading the form and also everytime the form loads the next record. Is there an event setting for this? Thank you in advance.
Loop terminates when report prints
I have code that reads Email from Outlook and searches for various pieces of text to store in a table. In addition to this, it takes the entire body of the Email, places it in a report (about 3000 or so characters) and prints the report. The code is enclosed...