Search results

  1. M

    Coding Help please

    Hey Mark on further debug of the code the error changes at the Set wDoc = wApp.Documents.Open (fn) The error comes up with a runtime error and it is saying that it is an invalid directory. I am wondering that if in the previous code that tells the location or the filename of the templates...
  2. M

    Coding Help please

    Ok thanks guys :) I will be playing with the coding this afternoon. :) will let yo9u know how i go Thanks Mark and BigDaddy
  3. M

    Coding Help please

    Here is the full code for the button: Private Sub btnPrint_Click() PrintReport Me.txtReportType End Sub And the Routine Public Sub PrintReport(ReportType As String) Dim wApp As Word.Application Dim wDoc As Word.Document Dim fn As String Select...
  4. M

    Coding Help please

    Hi again Mark After some playing around with the button function and the name of the code behind it i have got it to work so far through. There is now an error saying "Compile Error: Wrong Number of arguments or invalid property assignment" The section of code that it has highlighted is...
  5. M

    Coding Help please

    Hi Mark Yes that makes perfect sense. I have done the steps you mentioned above and yes the button works but when i change the code to call the module and routine it comes up with " Compile Error: Method or data member not found" Here is the code that i am using and it is looking at the module...
  6. M

    Coding Help please

    Yes mark i wrote most of the code and googled other snippets of code. I am at a loss because this has gone deeper than I ever thought it would.
  7. M

    Coding Help please

    Hi again Mark I am at a loss as to where and how to create the Subroutine you mentioned. I used the code that you had in place with the message box Public Sub btnPrint_Click() MsgBox "are you sure you want to print to MS Word", vbOKOnly ExportToWord.ExportToWord CallASubRoutine...
  8. M

    Coding Help please

    There is a field in the query that has the report type data in it. Also in the original code there was reference to the me.txtReportType as this is on the form that is used to print the different reports from the data in the recordset. I hope that this explains where the data is coming from
  9. M

    Coding Help please

    Also there is a field in the Form that is called me.txtReportType where the name of the report is populated.
  10. M

    Coding Help please

    The data for the ReportType comes from the query and that query is linked to 2 tables. (I thought that the SELECT CASE was the information that the routine needed.) The information for the ReportType Field is populated from a drop down in the tbl_Cable_Schedule which is linked to the...
  11. M

    Coding Help please

    Sorry for the late reply Mark but i have used the code that you have shown. Option Compare Database Option Explicit Public Sub btnPrint_Click() ExportToWord.ExportToWord End Sub And Option Compare Database Option Explicit Public Sub ExportToWord(ReportType As String) Dim wApp As...
  12. M

    Coding Help please

    Thanks Mark. Now the smallest problem has arisen. It seems that the onclick event is not working? I have tried to test the code structure and it is not showing anything or even in task manager even opening a word document. Have i done something wrong? Thanks again Mark Allan
  13. M

    Coding Help please

    Hi again Mark I have just put the code in place of the original code and it keeps getting an error "Compile error: Expected variable or procedure, not module" SHould this code go in behind a command button with reference to an OnClick scenario? Allan
  14. M

    Coding Help please

    Thanks Mark That is the type of thing i am looking for. Can you do me a favour and have a look through that database and tell me where i can improve it as well please. Allan I am willing to pay as well for the help :)
  15. M

    Coding Help please

    I hope this works properly. Here is the database
  16. M

    Coding Help please

    Hi MarkK Is there a better way to do the code because it all revolves around what the report type is. I know it looks clunky and everything . @arnelgp would i put that code snippet in after each loop or at the end of the code? Would it be better if i upload a copy of the database that i am...
  17. M

    Coding Help please

    Hi all I am having issues with some coding and i was wondering if i am doing it right. Here is a copy of the code that i am doing: Public Sub ExportToWord() Dim wApp As Word.Application Dim wDoc As Word.Document Dim rsReports As DAO.Recordset Set wApp = New...
  18. M

    Please help - Import Macro

    Thank you for your advice Ranman :) but how exactly would i do that? I have been trying and it is all failing and i am lost. I dont even know where to start the Macro or the query. Please can you give me some dumbed down instructions to make the macro please. TIA MITSupport
  19. M

    Please help - Import Macro

    Hi all, Thanks in advance for reading this question: I have been trying to import data from a workbook with multiple spreadsheets into my front end database which is connected to a Web app back end (Access Web App) on SharePoint (Office 365).:banghead: All the tables are linked and there are...
  20. M

    Newbie trying to create a macro that will import from Excel

    Hi Ranman Thanks for your reply. I will give it a go this afternoon and let you know how i go. Regards MITSupport
Back
Top Bottom