• WSPaulK

    WSPaulK

    @wspaulk

    Viewing 15 replies - 16 through 30 (of 259 total)
    Author
    Replies
    • in reply to: Access template (2K and XP) #650441

      I’m assuming you are referring to the handlebuttonclick function in the switchboard forms module. This is a custom function that carries out instructions based upon the button on the form that was clicked. If you look at the click event in the button’s properties sheet you will see that each button calls this custom function passing to it the number – or position on the form – of the button that was clicked. The custom function then uses this number to determine what instructions to carry out – open a form, report etc. It does this by opening the switchboard items table, and finding the record that matches the page number (switchboardid) and button number (itemnumber) of the switchboard form. It then uses the value in the command field and a select case statement to match the value to the constants defined at the beginning of the function.

      But don’t worry. You don’t really need to know how this all works because there is a switchboard wizard that configures all of this for you. In XP go to the Tools menu/Database utilites and select the switchboard manager. From there you can configure which buttons you want to open which forms, reports etc.

    • in reply to: Hyperlinks/Email addresses (97) #650436

      If mailto: is always at the beginning of the field you can use the mid function in an expression in a calculated field in a query to isolate the name. Then just concatenate a comma. Something like

      Mail To: Mid([hlinkfield],8) & “,”

      Make it 9 if there is a space between mailto: and the name.

    • in reply to: stop the execution of a function (Access 2000) #650395

      If you want this function to be used in more than one situation you will need to pass values to the function when calling it. This means you will need to have one or more arguments in the function whose values you can test and then perform appropriate actions. For example instead of this:

      Public Function MyFilter()
      If IsNull(Forms![FBenchmark]!Office) Then
      DoCmd.Beep
      MsgBox ” Please select Office first ! ”
      Exit Function
      End If
      End Function

      It would look something like this:

      Public Function MyFilter(intOption as Integer)
      If IsNull(intOption) Then
      DoCmd.Beep
      MsgBox ” Please select Office first ! ”
      Exit Function
      End If
      End Function

      Not sure what all you are trying to accomplish – more details might be helpful.

    • in reply to: Data type error (2K and XP) #650390

      Just to add my 2 cents to the 6 cents that has already been offered, most likely the data type mismatch error occurred in the code behind the button in the where condition argument of the OpenReport method. The where condition argument is a string and can get tricky when using numeric criteria. Also, a long integer type might be more appropriate rather than a double if your id’s will be whole numbers only. Long Integers take up half the room of doubles and should be more efficiently sorted and indexed, though that last bit is pure supposition on my part.

    • in reply to: Setting cursor to end of text (Access 2000) #650104

      Go to tools/options/keyboard tab. You can set the enter field behavior to go to end of field. This is a global setting so I’m not sure if this suits your needs. The only other thing I can think of is to use a Sendkeys statement to pas an to the control. I tend to shy away from Sendkeys if I can. Pass a to go to the next line.

    • in reply to: Order By on a Report using a Variable (XP) #650097

      I believe you need to employ the orderby and orderbyon properties of the report to affect the sort order of a report.

    • Thanks Allan!

      I’ve got something similar to the first example. The problem I’m having now is setting who the emails come from. We’ve created a specific mailbox for this operation and I’m now trying to figure out the syntax for setting the sender’s mailbox. Thanks again for sharing!

    • in reply to: Increase Speed of Opening Form (Access 2000) #647517

      I don’t know if that would help. What makes you think it is the listboxes that are slowing down the opening of the form? Do you have a lot of code in the form’s module? I’ve read that heavy forms can be slow to open. Have you tried removing the listboxes temporarily to see if there’s a difference? If your form is code heavy you can create custom functions in standard modules and call them from the form passing whatever values you need to.

    • No, I get no error message. The memo is created with the addressee, subject line and the report in HTML format nicely pasted into the body of the memo. But then it just sits there and isn’t sent automatically which is what I thought setting the EditMessage argument to False was supposed to do.

      Notes R5 is supposed to be MAPI compliant but there are still issues with MS apps. I will look into the dll you mention and see if that makes a difference. Thanks for the suggestion, Charlotte.

    • It looks to me that you referenced the subform control with “Me.MondayActivities_subform.SetFocus”. You want to set the value of a control on the subform you need to replace setfocus with either Form!ControlName or just ControlName. The value property is the default property so you do not need to specify it. Try using the expression builder – it’s perfect for this sort of thing.

    • in reply to: Debug window (Access 97) #610442

      If you are using a sub procedure rather than a function I believe you need to use the CALL keyword as in Call subprocedurename. Alternatively you can change it to a function procedure and type ? functionname.

    • in reply to: DLookUp (AXP) #610407

      Sorry if I wasn’t clear I meant the before_update of the control rather than the after_update. This way you can set the Cancel argument to True if the ID already exists which will cancel the update and even issue a docmd.undo if you want to remove what the user entered.

    • in reply to: DLookUp (AXP) #610390

      Try using the before_update event instead of after_update event. You want to cancel the update if the id is already in use.

    • in reply to: IsNull/Is Not Null (WIN 2000 Acc 97) #610374

      I’ve noticed this behavior most commonly with linked data sources. And, so far, have not been able to find a way around it.

    • in reply to: Sorting and grouping (A2K, SR1) #606426

      I don’t recall experiencing that. Try opening a new query and adding the 3 tables to it. Does the line show up in the design grid? I’ll take a look and see if I can duplicate it. I don’t have A2k just 97 and xp, though.

    Viewing 15 replies - 16 through 30 (of 259 total)