Search results

  1. M

    command button code

    Did you check the "[" at strLinkCriteria? Probably it should be like this: strLinkCriteria="[Cutomer ID]=" & lngCustomerID Only after setting "[" access will accept field-names including space(s).
  2. M

    Calling embedded word documents

    I've only got half way: Assumption: OLE-objects are in a certain field in a certain table. Then: sub openObjectInWord() Dim oWord As Word.Application Dim dbCurr As Database Dim rs As Recordset Dim oOLE As Object Set dbCurr = currentDB Set rs =...
  3. M

    'Dim' ing a Database object

    When using Set db=CurrentDB you definately do not open a DAO-database, but this - current - i.e. JET-database. Did you want do open your own database - which is not connected but this current one - again with DAO? Why? Normally DAO is only worth when accessing other databases (connected)...
  4. M

    unaccessible database

    Did you copy your database to a local harddisk once? Did this work fine? (I assume: no..) There is some other problem at setting up Access!
  5. M

    Memory when using VBA

    Just read the online-help about DIM (private/public). Normally all variables are deleted (and no memory is used) when exiting a sub/function. Just in case you used globals in the header like: Option explicit Dim rsMyRecordset as Recordset Dim dbCurr as Database Sub ... then you should set...
  6. M

    a few quick ?'s

    What about the IsFormOpen-function? Probably this doesn't work properly - otherwise it'll put you at least to that MsgBox!
  7. M

    Setting query column widths from VBA

    When you open a query by DoCmd.OpenQuery it performs this query just as if you opened it from the database-window. That's why you can format the output of a DoCmd.OpenQuery-command by formatting the output when opening from the database-window. There you select a certain column and set it to...
  8. M

    Auto-Mail in Outlook

    kindly respect: here it's access-programming
  9. M

    Creating Export Specifications Using VBA

    I assume not your export-specifications differ but your tables (diffent field-types, -sizes etc.). In this case this is always enough: DoCmd.TransferSpreadsheet acExport, TableNameOrQueryName, ..otherParameters The TransferSpreadsheet exports no matter how many fields or which fields you need...
  10. M

    NO MATCH

    don't do: Me.Bookmark = RS.Bookmark If you 'transfer' bookmarks, both recordsets need to be identical! instead use this: set rs1=me.RecordsetClone rs1.FindFirst <criteria> if rs1.NoMatch then goto doSomethingElse me.Bookmark=rs1.Bookmark set rs1=nothing Although: this means you need to find...
  11. M

    Keeping variables through an error?

    Is there any way declaring an OnErrorGoTo-command as default, i.e. this error-routine is used, when any code does not contain an OnError-statement? I have worked a long time with finding a clue to this, cause all variables are emtied if only one error is not handled by an appropriate routine...
  12. M

    Outlook Recipients.Add only allows single email address

    Note: All Add-Commands only allow one object to be added (to a certain collection). Why not adding twice like: objMail.Recipients.Add ("person1@domain1.org") objMail.Recipients.Add ("person1@domain2.org") and so on? (hope this works with Outlook)
  13. M

    Importing an append table query

    Just switch to SQL-screen. There you find your query as SQL-string. Copy this to any VBA-module. Then you can (easily?!..) change your query like this: sub test(lngSearchValue as Long) DIM SQL as string SQL="CREATE... " SQL=SQL & "WHERE ThisValue=" & lngSearchValue & ";" DoCmd.RunSQL SQL end sub
  14. M

    Information on Access 97 Default System Tables

    1st: be very careful! Normally system tables are hidden, which might be reasonable.. 2nd: all data contained in these tables is made accessible in certain functions. Why not using them? 3rd: which kind of data are you searching for?
  15. M

    Error messages and Failed to create module

    Probably Your database is quite corrupted.. I'd try to create a new one and then import all of the old database - until an error occurs. Hope it's only a few ones.. Good luck!
  16. M

    Subform Positioning

    Access the subform via .form: Me.subformName.Form.certainElementInSubform.SetFocus
  17. M

    Close Access97 Open Sessions and Then Close Database- new twist

    Sure You need a timed form, as Travis said. This hidden form could check whether You have set a certain field to true (like [Parameters].[close]) and then does Application.Close. Accessing this table in a multi-user-environment is easy, isn't it?
  18. M

    Ref: Add New Record

    You can just look up whether NewData is already in table: if isnull(DLookup("[CallNo]","CallNoTable","[CallNo]=' & NewData & "'") then ' add new record else ' NewData is in table, do not add end if
  19. M

    What is RPC-Server error??

    Context: MS-WORD accessed by MS-ACCESS Subject: Error -2147023174 (800706ba)at 2nd try One of our Access-databases perfoms VBA-Code in WORD (via object WORD.Application). At the first try, it always succeeds and creates a beautiful document containing all relevant data. But at the 2nd try it...
  20. M

    Programming

    I agree to jfi: It's not that difficult to hide any Access-parentship by changing the appropriate properties. I suggest: StartOptions: no database-window, start with specific form, disable interrupt-Keys Forms: use BorderStyle=0 (none): now form is just a filled rectangle without title General...
Back
Top Bottom