Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. RoyVidar

    XL Automation Started Crashing Access

    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...
  2. RoyVidar

    DLookup function is swaping dates

    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
  3. RoyVidar

    Split database Compacting

    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...
  4. RoyVidar

    Split database Compacting

    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
  5. RoyVidar

    Memo data type field

    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...
  6. RoyVidar

    Form validation code causing access errors

    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
  7. RoyVidar

    Form validation code causing access errors

    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...
  8. RoyVidar

    Type Mismatch error happens after conversion to Access 2007

    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...
  9. RoyVidar

    Creating two Primary Key Fields both indexed

    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...
  10. RoyVidar

    filesearch.execute stops working after some days

    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...
  11. RoyVidar

    Return last record inserted into table

    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
  12. RoyVidar

    terminate winword.exe with vba

    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...
  13. RoyVidar

    terminate winword.exe with vba

    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...
  14. RoyVidar

    terminate winword.exe with vba

    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...
  15. RoyVidar

    On Timer Event Not Working in Access Forms

    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...
  16. RoyVidar

    JOIN Recordset with Table

    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
  17. RoyVidar

    On Timer Event Not Working in Access Forms

    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...
  18. RoyVidar

    Reference form from another form's module

    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...
  19. RoyVidar

    JOIN Recordset with Table

    As far as I know, no. I think the join will need to be performed prior to opening it, else you'd need some looping. Roy-Vidar
  20. RoyVidar

    Cannot open Excel wbook from VB6

    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...

Part and Inventory Search

Back
Top