Search results

  1. Travis

    Adding numeric values to a TreeViewControl?

    Pad the Key with Zeros (0) Example for Key value only: when strChild=1 Key value would = "0000000001" You can do this by formula: StrKey=Right("0000000000" & strChild,10) This will take the Right 10 Characters. You could then use the VAL function to get the numeric value of the Key if...
  2. Travis

    Automatic emails choke

    How is the Error Handler Setup. You could catch this Error, Change the Receipent to You and Place the Who it was suppose to get sent to in the body of the email. However, I don't know how you are trapping errors in this routine currently. Can you post the code.
  3. Travis

    Sql

    The best way is to create a DataSheet form Queries and Tables are not the best place for user interaction. Set the Record Source = to the Query/SQL Statement. Or you could set the Forms RecordSet property = to the Select statment opened as a RecordSet (ADO). But if you must then create a...
  4. Travis

    xml output from an access table

    I use ADO for this: (Sample Code) Public Sub SaveQryXML(stPathFileName As String) Dim rstTemp As ADODB.Recordset Dim cnnTemp As ADODB.Connection Set cnnTemp = CurrentProject.Connection Set rstTemp = New ADODB.Recordset rstTemp.Open "qryTest", cnnTemp...
  5. Travis

    Using dimension as field name

    When dynamically using field names use [ ]. Change this [product_group_year1].'" & per & "' = " To this [product_group_year1].[" & per & "] = "
  6. Travis

    Promp "Save As" Window For User

    Check This site out Save As Common Dialog
  7. Travis

    Getting a 3464 Error

    1. I don't understand why the first query uses yes,no and the second uses -1,0 2. Try this: Public Function ToggleIFC() Dim CurRec As Long Dim strSQL as String ' Stores the value of F_Main_subform's current record in the variable CurRec. CurRec = Form_F_Main_subform.CurrentRecord '...
  8. Travis

    Call Statement

    HOWTO: Find a Window Handle from an Instance Handle How to Kill an Application with System Menu Using Visual Basic
  9. Travis

    Difficult LEFT JOIN Prob

    SELECT Wards.Wards FROM Wards LEFT JOIN (Select * From Returns Where [TheMonth]="March") AliasName ON Wards.Wards = AliasName.TheWard WHERE (((AliasName.TheWard) Is Null)) ORDER BY Wards.Wards Forgot the AliasName on the Recordset
  10. Travis

    Difficult LEFT JOIN Prob

    SELECT Wards.Wards FROM Wards LEFT JOIN (Select * From Returns Where [TheMonth]="March") ON Wards.Wards = Returns.TheWard WHERE (((Returns.TheWard) Is Null)) ORDER BY Wards.Wards
  11. Travis

    email automation

    It should be the same code that you use on the command button, with these differences. 1. It should be a Public Sub/Function in a Module 2. This Sub/Function should be called on the Timer Event of the Form
  12. Travis

    email automation

    In order to do it with MS Access, you would need to have the Access Database open. You can use a Form's Timer Event to check the date and time and then fire off the event that does the email. You can use the windows scheduler to run the database every Monday. However, you could go with a C...
  13. Travis

    Max number of characters for Recordsource

    Post the SQL Statement. There may be something in it that is not translating the way you are expecting.
  14. Travis

    code help

    Can the textbox called Select_form be excluded? Thanks..... If Me.NewRecord Then For Each ctl In Me.Controls If ctl.ControlType = acTextBox Or ctl.ControlType = acComboBox Then If ctl.Name<>"Select_form" Then ctl.BackColor = 16777215...
  15. Travis

    Error Launching DTS Package

    What has happened here is that while the DLL is located on the computer, it is not registered. You can possibly register it using the regsvr32 command: Example: regsvr32 c:\windows\system32\myfile.dll Registering of DLL files should occur on the installation of your application. This can...
  16. Travis

    Sending A Query Via VBA

    The SendObjects Function itself is in a diffenet Procedure then the Loop. You call this procedure from inside the loop. It has been found that the SendObjects Function does not perform well when it is in the same procedure as the Do...Loop.
  17. Travis

    Main DB part 2

    If you are using SHELL to open the DB's add the /User UserName to the command line
  18. Travis

    Sending A Query Via VBA

    Actually for one the answer is "No it does not need to be inside the loop" Example Sub TestLoopEmail() Do ... 'Looping through RecordSet ... If SendThisEmail(.Fields![SW Email],rstSubject.Fields![Subject]) = True Then 'Email Successfully Sent Else 'Email Failed...
  19. Travis

    Sending A Query Via VBA

    For your first solution you need to move the SendObjects command to its own Procedure (outside the loop). For your second solution you would need to send the Query to a physical file to add as an attachment.
  20. Travis

    Problem with data entry in linked subforms

    Then you will need to Add Code to the Before_Insert Event of the Sub Form and reference the fields from you "Parent Form" to fill in the fields on this "Pop-Up" Entry Form. Example Me = the Current Form Object Sub Form_BeforeInsert(Cancel as integer) Me.[Popup Forms Field Name]=Forms![Parent...
Back
Top Bottom