Recent content by willpower

  1. W

    Time Calculations

    Noticed a mistake in the above section... the check should be: If (Weekday(fnSLA) = vbFriday And TimeValue(fnSLA) >= #7:00:00 PM#) Or (Weekday(fnSLA) = vbSaturday) Then ... ...checking for times landing on or after 7pm on Friday, not 7:30...:o willpower
  2. W

    Time Calculations

    Erk...just logged back in to find this topic's gone all hot on me...and that the function's flawed...perhaps I should slip away quietly now. Thanks for stepping in bob... Just getting around to downloading the db now, so apologies I'm not around at the right times... would really appreciate...
  3. W

    Time Calculations

    It sounds like you're trying to call the function as part of an SQL expression attached to a form. Instead, you'll need to call the function from code in an event procedure (which event depends on when you need to update the value) For instance, you may need to use the AfterUpdate event for...
  4. W

    Time Calculations

    Sorry for not responding earlier...been on leave. I think you want tomething like this... I haven't exactly tested this thoroughly, but off the top of my head, you want to call this function, passing in the date (and time) of the ticket dispatch, and the severity level as a number, e.g...
  5. W

    Time Calculations

    It looks like you need to test for the day of the week either the ticket time or the response time falls into. You can test for the weekday in VBA using the Weekday(Date, [FirstDayofWeek As vbDayofWeek = vbSunday]) function. I normally omit the [FirstDayOfWeek] optional parameter and test...
  6. W

    What's wrong with this statement

    Do you mean that AppendAllFields and [some table] are string variables in your code? In which case, try something like: sql = "SELECT * INTO " & AppendAllFields & " FROM " & [some table] & ";" The brackets around [some table] suggest to me that it may be a value you're pulling from a...
  7. W

    OpenRecordset on Linked Tables

    I don't think the fact the table is linked is causing the problem. The error suggests that TWO parameter values are missing. Is tblTest a table or a query? If it's a query, is there another parameter somewhere in the criteria? willpower
  8. W

    Controlling Word again - the plot thickens

    Dear all, Using VBA in Access to control mailmerge docs in Word. The mailmerge doc includes {IncludePicture} fields in both the main document body and the header, so that the datasource can supply paths to different images for different records. All the picture fields are in the form...
  9. W

    Controlling Word - Update Fields

    Solution Aaarggh! Solved it... objWord.ActiveDocument.Fields.Update ...for anyone who's interested. Calls the Update method on the Fields collection!
  10. W

    Controlling Word - Update Fields

    Hi all, I'm trying to control Word Mailmerge docs through my Access VBA Through a convoluted process which I'll avoid for now, I end up with a new (already merged) document in word. My Word object is named objWord and the merged document is objWord.ActiveDocument. From this, I use the...
Top Bottom