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 Mike Lewis 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. Ratman11

    Tempermental Bat File

    I have a bat file set-up to run at set time every morning on my scheduled tasks. The code in the bat file is as follows: START "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "H:\Service Centre\DataTeam\AccessDatabases\dbautomation.mdb" i've been having a few glitches with it. On...
  2. Ratman11

    Controlling Outlook from Access

    Hi That didn't work, but managed to fix it by replacing it with: Dim olMail as Variant it was because the sent-items folder contains more than just mail items (appointments, calendar tasks etc.). It all works now!
  3. Ratman11

    Controlling Outlook from Access

    Hi I get the following error on the highlighted line of code...trying to run this to delete certain items out of my sent items folder after running some batch reports. Running this on access 97 The error is: Run Time Error 13 'Type Mismatch' I thought it might be because olMail hasn't been...
  4. Ratman11

    ODBC Field Names

    Hi I'm using a Pass-through query in Access 97 (i know, old version!!) to get data out of an ODBC database. The problem is, the database has over 250 fields so I cannot get all the data using a standard link-table in access, & as a result, I don't know the ODBC field headers for the data i need...
  5. Ratman11

    RPC Server Unavailable

    found an even easier method..sorted the data in the access query first & then exported it!
  6. Ratman11

    RPC Server Unavailable

    I have some code that is exporting a query to excel & then formatting it. I am having a few issues here...if i try to reference the highlighted line to 'objex' i get the above error and it won't run, but if i don't reference it then excel remains running in the background and the workbook...
  7. Ratman11

    Method 'Open' of objects 'Workbooks' failed

    Thanks Jeff, the message box fixed it.
  8. Ratman11

    Method 'Open' of objects 'Workbooks' failed

    nope. this code is running off a form that has two text boxes - year & week. that is where those bits of info are coming from. does it matter what references i have running?
  9. Ratman11

    Method 'Open' of objects 'Workbooks' failed

    sorry, did the highlighting incorrectly...it should be on this line: objex.Workbooks.Open "H:\Service Centre\Reports\Wkly Reports\" & Year & "\wk" & " " & WeekNumber & "\RWAReportwk" & WeekNumber & ".xls"
  10. Ratman11

    Method 'Open' of objects 'Workbooks' failed

    Hi i posted a problem i was having with this code last week - when i ran it the first time it ran ok, the second time i got the above error. I got some new code and pasted it in & it worked fine. I have now come to run it again today, and on the first run I am getting the above error on the...
  11. Ratman11

    update table from unbound text box

    Hi PH Thanks for that - finally managed to get it to work. *phew*
  12. Ratman11

    update table from unbound text box

    Yes, i am running access 97...oh lucky us... tried the docmd.runsql statement and came across a couple of issues (code below).... 1) When i clicked on the button, it asked me to enter criteria for the user name, rather than taking it from struserid 2) I cannot get it to identify with a set...
  13. Ratman11

    update table from unbound text box

    Ok, here is the code i have: Private Sub Command26_Click() Dim rst As ADODB.Recordset Set rst = New ADODB.Recordset On Error GoTo Err_Command26_Click If Nz(StoreInvoiceNumber, 0) = 0 Then MsgBox "Please enter invoice number" Else With rst .ActiveConnection =...
  14. Ratman11

    update table from unbound text box

    Yes I've got 2.6 selected
  15. Ratman11

    update table from unbound text box

    Hi Thanks for that, i pasted in your code as above but i keep getting but i'm getting a 'variable not defined' on the currentproject section...
  16. Ratman11

    update table from unbound text box

    Stupid question number 37 this week!! I have a form with an unbound text box - this text box is updated on form open with the below code: Private Sub Form_Open(Cancel As Integer) DoCmd.SetWarnings False Dim struserid As String struserid = Environ("UserName") Me.UserName = struserid End Sub...
  17. Ratman11

    Method 'worksheets' of object '_Global' failed

    Hi Thanks for the responses, tried the first code but couldn't get it to work. Copied PH's code in place of mine & now it works everytime, like a charm! Thanks guys!
  18. Ratman11

    Method 'worksheets' of object '_Global' failed

    Hi I'm running a piece of code that extracts a query to excel, formats & then mails it out. The first time I run the report it works fine, but the second time i get the above error. I have figured out why...excel is still running in the background & if i go to task manager and end the .exe...
  19. Ratman11

    Save export with specific filename

    Thank you!! That does the job perfectly.
  20. Ratman11

    Save export with specific filename

    The form is called frmRWAReport The unbound text field is called WeekNumber There is also a 'Submit' button The code currently is: Dim mystring As String DoCmd.OpenForm "frmRWAReport" mystring = "frmRWAReport[WeekNumber].Value" 'Export the report. DoCmd.TransferSpreadsheet acExport...

Part and Inventory Search

Back
Top