I put it in the function that checks if the table exists (not the main procedure), so the CurrentDB is updated every time that function is called (which is on every table).
So it's (generally):
Get first table name. Set = strTableName
Call function to check if table exists
Set db = CurrentDB
Loop through each tabledef in tabledefs.
Return true of false if tabledef.name = strTableName
If true, append...
User Profile
Collapse
-
Thank you both so much for your responses. Sorry for MY late response, I was keeping tabs on your answers but was pulled onto something else and didn't want to respond until I actually was able to try what you suggested.
I tried both of your suggestions (TableDefs.Refr esh from ADezii and CurrentDB from NeoPa). Thanks for explanation on the CurrentDB, that totally makes sense.
In the end, the CurrentDB.Table sDef.Refresh...Leave a comment:
-
Hi!
Sorry for the confusion, I don't know if "refresh" is even the right word to use. I need to refresh (or something) the whole list of tables objects in the database, rather than just one table itself.
Situation (Short version): I'm doing a "make table" query via SQL. Next, I need to run code that checks the database to see if the table exists, and if so, returns "true".
Problem:...Leave a comment:
-
Need to make table, refresh, see if table exists (VBA). How do I refresh?
Hi!
I'm using VBA in Access 2007.
I am looping though a list of all table names in all (selected) external databases and need to append the external data to my current database table (if the table exists in my current database) or make a new table with the data (if the table does not exist in my current database). I'm missing one component which is a "refresh" after I make the new table.
Currently,... -
NeoPa- Thanks for the links
The acSysCmdInitMet er is something I have also looked up and tried earlier today. I think the results were the same as the echo.
The other link to the task list is very interesting to me. I am looking for something to use in potentially all my applications going forward and I'm completely open to it being a seperate form. In fact, I think I would prefer it. When I tried to update a single field...Leave a comment:
-
Rabbit- Interesting, I hadn't tried a timer in any way so maybe that's my next step.Leave a comment:
-
Trying to use the status bar as a progress monitor
Hi!
I need to run 20ish queries in VBA behind a button on a form in Access 2007.
I would like to show the user the name of the process that is being run in the status bar. Instead, the "Run Query" process bar shows repeatedly. That is helpful if you are running 1 query, but not 20.
When I use the DoCmd.Echo True "Message to user", you can't see my message, instead the "Run Query"... -
From reading a post by Adezii:
http://bytes.com/topic/access/answer...thin-ms-access
I removed the recordsets and got:
Code:Sub SendEmailBytes() 'Provides the Send Mail automation. Send an E-Mail and 'Attachments from Access via Outlook to Multiple Recipients Dim oLook As Object Dim oMail As Object Dim olns As Outlook.NameSpace Dim MyDB As
Leave a comment:
-
I don't disagree with anything you are saying and I understand that the purpose of the security message is to prevent automatically sending email messages.
I'm not looking at or interested in decreasing the security of users email accounts. I only wanted to make sure that there is not some option that I don't know about where you can somehow use Access (2007) and Outlook together to send safe, permitted, user initiated emails. ...Leave a comment:
-
I had forgotten about the Chr(10) part, but I'll use the vbCrLf from now on.
Thank you!!Leave a comment:
-
Rabbit,
"Open it up" as in the Outlook security? That makes sense, but does that really mean that you can't send automated emails from Access to Outlook?Leave a comment:
-
Adam Tippelt- I have looked. Ultimately people recommend SMTP.
Do you know any good references for setting up a 'trusted' connection?
I'm just wondering if there are ways for Access and Outlook to work together for regular ol' business processing involving automated weekly emails.
Thanks!!Leave a comment:
-
NeoPa- Yes, but in my case the user is the one initiating the sending of the emails. We don't need the security window because the emails are not malicious.Leave a comment:
-
Access to Outlook without security warning, without SMTP
I am building an Access 2007 database to automatically send out multiple emails (1-500 with one attachment each) via Outlook. I need to have multiple users in a secure corporate enviornment be able to run it from their desktops. What is the current best code for this excluding SMTP which is what I've seen on some of the forums?
Thank you. -
Multiline in Access 2007? Need a line feed on a text box.
I'm building a window to show a log at the completion of each process.
Ex "6/15/2011 8:27:56 PM IMPORT COMPLETE"
I need a line feed in my text box (so I can list them) and using Chr(13) returns the paragraph box but not the line feed. I've looked this up already and everywhere it says that you need to set the text box multiline property to true.
I'm in access 2007 and can't find it.
What am I missing? -
I am new to forums and don't have it all figured out (I've ended up clicking on the link to the question to get all the reponses. I don't know how it's supposed to work).
I was actually about to respond to all the posts, but then thought I shouldn't. Thought it might be too much of me. :).
I made a brief reference to your code earlier, but only to say I was going to check it out.
I've encountered the pesky...Leave a comment:
-
NeoPa,
Thank you a TON for reading and replying! My tone may have come across less appreciative that I intended!
1. I'm using 2007. You are right that I should state that. It didn't occur to me. Also, I have had some time off from building databases so I don't actually remember what I was doing in previous versions. I'll double check this point, and maybe see if I still have things I've built in the past to get a better...Leave a comment:
-
NeoPa, Yes, I was referring to Excel. I think it's strange that I can manually import an excel file, set up import specs, save the specs, but then have no way of using them again.
I know that text files are different and that you can use your specs name in the TransferText function.
I wasn't expecting not to be able to do this. There is no other function to use?
Rabbit, In the meantime while I was waiting...Leave a comment:
-
Shoot! It's definately frusterating that it allows me to set up and save the import specs but not use them in vba!
NeoPa, I'm going to check out your code. Thanks for the reminder that I wouldn't know the name of the file I was going to delele, because I was assuming it was something similar (or started in something similar each time). Would there be any other way to identify the import errors table?Leave a comment:
-
For sure, but it will be run every few days and I'm trying to make it so the users don't need to adjust the import file.Leave a comment:
No activity results to display
Show More
Leave a comment: