Search results

  1. H

    Import Specific lines from Text File

    If you could construct part of the text file as an ini file you could retrieve the item using profileGetItem (do a search on this forum)
  2. H

    determine word is open?

    Thanks! but mine is a lot shorter!
  3. H

    determine word is open?

    Thanks all for your replies - very overwhelming I don't know about the closing down part but I didn't notice anyone answering how one can tell its open so I've devised this simple test Dim wrdTmp As Word.Application On Error Resume Next Set wrdTmp = GetObject(, "Word.Application") If...
  4. H

    determine word is open?

    How do you determine if the word application is open or not? How can you close it if it is? Thanks
  5. H

    intermittent Access to Word "Copy & paste" anomaly

    If you mean a mail-merge in access, this was not an option since the user wants to be able to edit the individual pages and resave them for later use. If you mean a mail merge in word, Firstly it will entail the recordsource being open each time one wants to view the document and to copy and...
  6. H

    intermittent Access to Word "Copy & paste" anomaly

    Thanks for the quick response! I am posting my code for the whole procedure. The first part builds a sql for the recordset. i have tested the generated sql and it is fine. Please ignore the part which are irrelevant Thanks again Private Sub Command2_Click() Dim rs As ADODB.Recordset...
  7. H

    intermittent Access to Word "Copy & paste" anomaly

    I have a procedure running in MSaccess which creates a multi page word document based on records in a database. Simplified it runs like this:- open recordset For each record: open a presaved word document(1) which contains bookmarks based on fields in each record populate the document with the...
  8. H

    DOCmd.TranferText

    Thanks. The import spec is useless if field names have been added or edited. I have now learnt to create a schema.ini immediately before the docmd transfertext so it uses that information Thanks Only thing is that text is all surrounded in quotes. With a specification this can be altered but...
  9. H

    DOCmd.TranferText

    I can create a schema file but when I use it as a specification in a transfertext export I get an error? How did you use it Thanks
  10. H

    jet engine substitutes "#" instead of "." ???

    Transfertext using schema Thanks but that does not seem to be the problem. as I wrote the problem is that another field had been added which was not included in the export specification used. I have now got a create schema function which runs just prior to the transfertext. however I don't seem...
  11. H

    jet engine substitutes "#" instead of "." ???

    Have already tried it -idntical error thanks Have now decided maybe my export specification may be invalid since some fildnames have changed So although I can easily make a new spec, how can I set it to always include the right fieldnames? I am reading about creating a schema.ini on the fly...
  12. H

    jet engine substitutes "#" instead of "." ???

    I am doing a transfertext I am using a variable TempNow to specify a path ending in ".csv" tempNow = appPath & "config\cdms" & tempNow & Chr(46) & "csv" In the immediate screen I see the fullpath correctly i.e ends with .csv However when running it I receive an error to check valid path etc of...
  13. H

    Fill 'empy' part of text control with stars*****

    Fill 'empty' part of text control with stars***** I would like the remaining part of my text control to show stars e.g control value is 12 it shows *************12 control value is 3567890 it shows *********3567890 My text control does not have a fixed width, this is set in code depending on...
  14. H

    Loop thru all controls on a form/report and delete them

    Finally got it going! I think it wan't working because the vba interface was open??? Thanks a lot
  15. H

    Loop thru all controls on a form/report and delete them

    Thanks Pat. It copies Ok but still does not preserve the code in the original report which is: Private m_RowCount As Long Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) m_RowCount = m_RowCount + 1 If m_RowCount / 2 = CLng(m_RowCount / 2) Then...
  16. H

    Loop thru all controls on a form/report and delete them

    Thanks Tried it but when it copies the report it does not copy the underlying code so thats no good. Also when closing the new object I get an error that it cannot be closed?? So I'm back to the old problem "How can I create a new report object based on a current one including the code?" Thanks
  17. H

    Loop thru all controls on a form/report and delete them

    Thanks for the good idea Pat! So what would i do? save a blank report , then open it (in design view), save it as a different name , and start adding controls? I tried saving the report using docmd.save ,"newreportname" but it says newreportname is not open. If I code docmd.save acreport...
  18. H

    Loop thru all controls on a form/report and delete them

    Thanks I am writing this report on the fly because the user has control as to which fields appear on it. This isbecause it is fed from a crossstab query and therefore the fieldnames are constantly changing depending on the criteria of the query which is feeding the crosstab. Hence the report is...
  19. H

    insert code into an object using code !

    Thanks, this is the code I wish to insert Private m_RowCount As Long Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) m_RowCount = m_RowCount + 1 If m_RowCount / 2 = CLng(m_RowCount / 2) Then Me.Detail.BackColor = 15263976 'Change value to the color you...
  20. H

    Loop thru all controls on a form/report and delete them

    But to delete them is a problem, What is the code ? delete ctl.name? Thanks
Back
Top Bottom