I was attempting to use fso but that's where I'm getting stuck. How would I properly use DateCreated to identify the correct file. I.E. the latest file created would be the one to import.
Spooooon!
Thank you very much for your reply. I've been playing around with some code but I just can't seem to come up with a way to say "MAX(DateCreated)" kind of thing.
If that makes any sense.
If you do have time to come up with an example that would be fantastic!
Thanks again,
Dave
I seem to be missing the entire help library for FileSystemObect. And to get my tech support to load it will be next to impossible.
What I'm trying to do is look in a directory such as "C:\thisdirectory" and identify the most recently created file. (and then import it as a table).
The files...
DUH!
I was having a blonde moment.
Here's what I came up with
Sub create_tables()
DoCmd.SetWarnings (False)
Dim This As Database
Dim Reportstable As Recordset
Set This = CurrentDb
Set Reportstable = This.OpenRecordset("tbl_Report_Names")
Do While Not Reportstable.EOF
SrcTable =...
vbajock,
Thanks for the information. Perhaps my question was convoluted.
Here is my complete sub sans a global declaration for "SrcTable"...
Sub create_tables()
DoCmd.SetWarnings (False)
Dim Reportstable As Recordset
Set Reportstable = [tables]![tbl_Report_Names]
Do While Not...
Greetings,
I have a table with 1 field = "Report_Name". The table (surprisingly enough) contains the names of reports - which have been imported to various tmp tables.
I have a varible declared = SrcTable as string.
Here is my code thus far.
SrcTable = "PCIM9METTM" 'this is the report name...
I'm not really sure how to go about achieving the desired result.
I have 2 tables. For example purposes each table has only one field. TableA!FieldA and TableB!FieldB
What I need to do is produce a recordset in which the values in TableB act as a lookup table and are used against TableA. The...
I thank you for your assistance. The option of choosing a primary key is not available with the TransferText method in conjunction with saved import specifications.
I do have a work around for this automated process now. I simply export the table to a spreadsheet and use Access to initiate a...
Yes the only thing that changes are the values. Sort of like this:
MAN. NumOfCars Value
FORD 1000 $100,000
SATURN 500 $75,000
MAN. NumOfCars Value
FORD 32 $50,000
SATURN 8 $80,000
So that...
alr0,
Thanks for the reply. The reasoning behind this is due to the data being imported. I am importing a text file coming from a formated canned report of a mainframe. So it doesn't play nicely with Access. The report has a reoccuring instance of values in the only constant field from month...
What I would like to do in either via vba or in an update query is to update [Field1] in a table called tmp_PCIM7METUB with it's AbsolutePosition in the table. I have no idea how to incorporate this into vba. Any suggestions on the code is greatly apprciated.
Thanks in advance,
Dave
These are great idea's however, this will be a process repeated throught the month and needs to be automated. The autonumber field is not an option for data type when you save the import specs.
I'm running A97 and I'm trying to build a macro with the TransferText method in which you can select...
Hi all!
I can't seem to find any information on importing a text file, using a saved import specification but having an autonumber field added on when it imports.
Any help would help a heap,
Thanks
Dave
I think it was the bit in CreateItem that was stopping me. I made some changes and found that this works.
Thanks for the guide!
Function MailTest()
Dim objOutlook As Outlook.Application
Dim itmMail As Outlook.MailItem
Set objOutlook = CreateObject("Outlook.Application")...
danvlas,
I also am in need of this. I already have the files. When I try to execute this as a function I receive a "variable not defined" error for 'objOutlook' and 'inmMail'
How to I dim these befor Setting the value?
Or am I missing something altogether.
Set objOutlook =...
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.