My experience is that being explicit is the best way of doing automation. This would mean declarate and instantiate objects at least down to sheet level, if sheet level is needed.
And never ever rely on any of the .Activethingies, which is impicit referencing, and might not refer to what you...
PHV's suggestion is an ISO standard - i e, an international standard covering the exchange of date and time-related data.
It's quite safe to follow Mr. Browne's advice, he is a very competent Access developer, and as he points out, CDate() wil fail on Null, while CVDate()
Roy-Vidar
1a) You should perhaps periodically compact & repair the DB, yes (every fortnight, month...). But do not fall for the temptation of using the "Compact on close" option that can be found somewhere, do it manually.
1b) A split database is the only reasonable way to use any kind of ACE/Jet...
1a) - No - a compact & rapair effects the current db
1b) hm - the frontend should normally not need any compacting, as it shouldn't contain any data
2) Check aut Tony Toews FEupdater - very good and free
3) NOT splitting, has all the pitfalls, like corruption, loss of data etc...
Roy-Vidar
They may corrupt under some circumstances. Some will use the trick of storing them in another table.
I've heard of the following trick:
In stead of binding the form control to the Memo-field, have the control unbound, and use for instance the on current event to populate the control with the...
Sorry, that's what one gets when not testing - forgot one line, just below the Private Sub statement and before the If statement, enter:
on error goto myerr
Roy-Vidar
The cancel you do in the BeforeUpdate event of the form, only cancels that event - the saving of the record, which is called from your "Close" macro, then it continues to try to close the form...
So, what you need, is for the "Close" thingie not to continue, if the form is dirty... Now this can...
Try putting a breakpoint in the function (hit F9 on the first executable line), then inspect the different values within the function by stepping through it (F8), by hovering the mouse over the variables, use the watch window etc...
You might consider using another test on the list, assuming it...
I find this to be a very strange request.
When you create a composite Primary Key, consisting of two or more fields, then the "Primary Key rules" is enforced on it.
- none of the fields can be Null
- the combination of them must be unique
And for terminology, this isn't two Primary Keys...
One update, is that the .FileSearch function is deprecated/removed from Access 2007, which means you probably soon need a replacement anyway (for this rather annoyingly bugging function).
MS suggests Dir or FileSystemObject http://support.microsoft.com/kb/935402
While I like the...
Depends how you're inserting them, and at which point of time you need the number.
If you use SQL, you can retrieve the last autonumber (identity) on the same connection through SELECT @@IDENTITY, see http://support.microsoft.com/kb/232144 for more details
Roy-Vidar
From a _very short_ browse of the code, it looks good.
I don't know, and I won't be able to test until in the evening, but one thought - could it be some race-condition? Perhaps the processes involved in closing the document, dereference etc, might not be finished when the new one is...
If your automation code leaves an extra instance of the automated application left in memory, then there is something wrong with the code.
In stead of trying to fix the symptom (kill the instance afterwards), you should, in my opinion, avoid this extra instance in the first place.
It's...
I think the most common reason for this, is usage of unqualified referencing.
Every usage of methods, properties and objects of the automated application, needs to be "anchored" in it's parent object.
Here's a link pertaining to Excel, but the same goes for Word...
Then use DMax in stead of DLookup, and in stead of updating the record, add...
If WeekDay(Date) = 3 Then
If DMax("TheDate", "tblEmailLog") < Date Then
MsgBox ("it worked")
CurrentDb.Execute _
"INSERT INTO tblEmailLog (TheDate) Values...
I think you're quite correct - to "join" recordsets, you'd need some looping (inner/outer-thingies).
Why not try to join prior to opening the recordset(s)? That's usually much more efficient than recordset approaches.
Roy-Vidar
I'd probably keep a table for this, either just a one record table to update per each mailing, or one to document the sending history. Here a short sample using a one record table called TheTable with a date/time field called TheDate - it will need an initial record/date.
' Check to see if...
There are seven fora dedicated to Access on this site, I'd say this question could be posted in either forum702 or forum705, I think.
I think the consensus is to use this version
Dim MyForm As Form
Set MyForm = Forms!frmMainMenu
at least if you're going to refer to/manipulate more than one...
Office Automation is sometimes a bit more quirky than other automation. My guess, and let me emphasize guess is that the implicit instantiation of the initial Excel object, has left one or more instances of Excel in memory (check it out with Task Manager), where at least one of them keeps the...
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.