Thanks to vbajock and StarPassing for such quick solutions. Both suggestions work on my PC at home, but then the original code also worked at home!
I will be in the office next Tuesday and the office PC is where the problem occured (both are XP). I will certainly post the results of the test...
The following code from PHV a few years ago is great for making a new directory when more than one sub folder may need to be created.
Sub myMkDir(strFolderName As String)
On Error Resume Next
Dim a, t As String, i As Integer
a = Split(strFolderName, "\")
t = a(0)
For i = 1 To UBound(a)
t = t &...
That did the trick anotherhiggins. Thank you so much for such a quick response! Can you think of anyway a user could have invoked the R1C1 reference style without going into Tools > Options > general or is this the only way to make this happen?
I have a spreadsheet on the network for other users and someone changed the columns from A,B,C... to 1,2,3... This results in column A1 being identified as R1C1. A standard formula: =SUM(C5:C54) is now =SUM(R[-50]C:R[-1]C). My questions are how did someone make this change and how can I...
Hello Remou,
Thank you for reminding me of the wizard for creating a command button.
I added the line in red to the wizard's code to open the specific spreadsheet that I wanted to view/print.
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Workbooks.Open FileName...
This is probably the easiest question of the day, but I cannot fine a way to open an existing Excel spreadsheet with the click of a command button.
Any help would be greatly appreciated!
Another idea is to make it impossible for the user to save with no data in the text box by having the form open with the save button NOT enabled. Then:
Private Sub Form_Dirty(Cancel As Integer)
Me.cmdCancel.Enabled = True
Me.cmdSave.Enabled = True
End Sub
If you wanted to give...
Another way is to use the Dir Function. Me.txtRunID is the new folder name at the end of the path and is in a text box on a form. User can change the RunID on the form before creating the new folder on the network.
Code will only create the new directory if it does not already exist.
Dim...
Thanks again. An unbound form is new territory for me, but I'll do some research and give it a try!
Just one question, is it possible to populate the fields on an unbound form with code when the form opens? Sorry if this seems like a dumb question, but like I said, this is new territory for me!
Thank you Remou and PHV for your feedback.
I am aware of the referential integrity constraints in adding records in the Junction table. However, I was hoping there would be a way to hold the main table data in a buffer until additional new data was added to the subform.
Then a message box at...
Is there any way to have a message box pop up AFTER ALL additions or changes are entered on both a main form AND a subform?
I realize that when you move from a main form to a subform Access automatically saves the current record before changes can be made to the subform. However, to the user...
Jerry,
Thank you for your suggestion. I tried the code and it does not execute between the bolded lines (for...next loop and msgbox are passed over). The function is called from On_click where the original code started. strCopyFrom is global to the form. Perhaps a simple fix to your code...
Hello Remou
I tried using the value for msoSortByFileName (.Execute 1) and had the same problem. Had to Ctrl/Alt/Del because Access was not responding.
Files included in the error report are:
C:\DOCUME~1\Stan\LOCALS~1\Temp\WERb8ed.dir00\MSACCESS.EXE.mdmp...
Remou
Thank you for such a quick suggestion - I did not think of this. I will have to wait until I get home to the XP machine this afternoon to try using the value and will let you know if it worked.
The following code works fine in Access 2000/Windows 2000:
With Application.FileSearch
.NewSearch
.LookIn = strMoveFrom
.SearchSubFolders = False
.LastModified = msoLastModifiedToday
.FileType = msoFileTypeAllFiles
.Execute msoSortByFileName
More...
Alex,
Thank you for your reply. Could you provide an example of populating a string variable and appending with each new file name?
I'm not sure of the code and where to place it.
Thanks again.
I have a simple app that copies files from one location to another. The file names to be copied are listed in an array (myList) and error trapping is in place that generates a message box EACH time a file is not found.
Question, instead of a message box for every file not found, is it possible...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.