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 strongm 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. trezraven

    Working with null vlaues

    Thanks to everyone!!! I took PHV's advice and it worked perfectly. Also, Gerry I created another table and your way works even better.
  2. trezraven

    Working with null vlaues

    ...#12/31/9999#, CoverLetter.txtEnd.Value) & "', 'mm/dd/yyyy')" & _ "Or CaseNo Like '" & IIf(IsNull(CoverLetter.txtCaseNumber.Value), "*", CoverLetter.txtCaseNumber.Value) & "'" & _ "Order by CaseYear, CaseNo " Now I am getting ORA-00936: missing expression error. I even...
  3. trezraven

    Working with null vlaues

    I changed my strSQL to strSQL = "Select Mandate_Type, Mandate_Date, Date_Mandate_Released, Addressee, Appellant, Appellee, CaseNo, NZ([Lt_Cases],"None Given"), Accident_Date, Addressee_Name, Recipients " & _ and now I get compile error: Expected end of statement and None is highlighted.
  4. trezraven

    Working with null vlaues

    ...Dim CurDoc As Document Dim Addressee_Name As Variant Dim Addressee As Variant Dim LT_Cases As Variant '*****Set up the connection to the database***** conn.ConnectionString = "Provider=MSDAORA; Data Source=TSD1; User ID=omitted; Password=omitted"...
  5. trezraven

    Working with null vlaues

    ...each block of commented code, separately, but to no avail. I get runtime error 94: invalid use of Null. Any help will be greatly appreciated. '*****Add formatting for table***** .TypeText Text:="RE: " .TypeText Text:=txtAppellant.Value .MoveRight unit:=wdCell .TypeText...
  6. trezraven

    SQL statement not returning information

    Does it matter that the strSQL works in another view where the date is stored as 5/2/2006 as opposed to being stored as 02/01/2007 in the veiw I am having the problem with?
  7. trezraven

    SQL statement not returning information

    ...Dim rs As New ADODB.Recordset Dim lngConnectionState As Long Dim strSQL As String Dim ntable As Table '*****Set up the connection to the database***** conn.ConnectionString = "Provider=MSDAORA; Data Source=TSD1; User ID=omitted for security...
  8. trezraven

    Help w/tables using VBA (Code messing up)

    Yes your code gave me exactly what I wanted. Thanks again!!!
  9. trezraven

    Help w/tables using VBA (Code messing up)

    Duh!!! I feel like such an idiot! Thanks. Everything is working fine now.
  10. trezraven

    Help w/tables using VBA (Code messing up)

    Thanks Gerry! I am now getting runtime error 5834 Item with specified name does not exist. The following line of code is highlighted: .Range.Style = "MyTableText"
  11. trezraven

    Help w/tables using VBA (Code messing up)

    I thought it would be easier to use a table so that the information will line up. I am open to other suggestions. I have never used Styles so if that is easier and you could point me in the right direction I am definitely willing to try it.
  12. trezraven

    Repeating a table on a page

    No need to worry. I figured it out. I just had to add parenthesis. Set ntable = ActiveDocument.Tables.Add(Range:=trange, NumRows:=8, NumColumns:=2, _ DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:=wdAutoFitFixed)
  13. trezraven

    Help w/tables using VBA (Code messing up)

    ...As String Dim trange As Range Dim ntable As Table Dim rstart As Long Dim rend As Long '*****Set up the connection to the database***** conn.ConnectionString = "Provider=MSDAORA; Data Source=TSD1; User ID=Omitted for security...
  14. trezraven

    Repeating a table on a page

    ...& " " Opinion.txtCaseNumber = rs.Fields("CaseNo").Value & " " Opinion.txtOpinionDate = rs.Fields("Opinion_Date").Value & " " '*****Hide the form so the document can come up***** Opinion.Hide '****Insert table***** ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=8...
  15. trezraven

    Help with SQL statement

    ...and to_date('" & IIf(IsNull(DCAMacro.txtEnd.Value), #12/31/9999#, DCAMacro.txtEnd.Value) & "', 'mm/dd/yyyy')" & _ "or Mandate_Type Like '" & IIf(IsNull(DCAMacro.txtMandate_Type.Value), "*", DCAMacro.txtMandate_Type.Value) & "'" & _ "Order by Appellant " and that fixed it. Thanks PHV.
  16. trezraven

    Help with SQL statement

    ...& "', 'mm/dd/yyyy') and to_date('" & NZ(DCAMacro.txtEnd.Value, #12/31/9999#) & "', 'mm/dd/yyyy')" & _ "and Mandate_Type Like '" & NZ(DCAMacro.txtMandate_Type.Value, "*") & "'" & _ "Order by Appellant " Now I get a compile error error that says Sub or Function not defined and Nz is highlighted.
  17. trezraven

    Help with SQL statement

    ...& DCAMacro.txtEnd.Value & "', 'mm/dd/yyyy')" & _ "or Mandate_Type = '" & DCAMacro.txtMandate_Type.Value & "'" & _ "Order by Appellant " '*****Open the recordset***** rs.Open strSQL, conn, adOenKeyset, adLockOptimistic '*****Get the data if not end of the record set***** If rs.EOF...
  18. trezraven

    Formatting Word Templates using Visual Basic Editor

    Resolved. After some playing around I changed my SQL to strSQL = "Select Mandate_Type, Parm1, Agency_Description, CaseNo, Appellant, Appellee, Lt_Cases, Opinion_Date, Chief_Judge, Mandate_Date " & _ "From CMS.V_Macro4mandate " & _ "Where Date_Mandate_Released =...
  19. trezraven

    Formatting Word Templates using Visual Basic Editor

    Thanks Gerry. I modified my SQL to '*****Set the datasource***** strSQL = "Select Mandate_Type, Parm1, Agency_Description, CaseNo, Appellant, Appellee, Lt_Cases, Opinion_Date, Chief_Judge, Mandate_Date " & _ "From CMS.V_Macro4mandate " & _ "Where Date_Mandate_Released =...
  20. trezraven

    Formatting Word Templates using Visual Basic Editor

    Thanks a lot. I have one other problem. I am trying to pull information from the database using the date that is entered on my form. Here is the SQL I am using: strSQL = "Select Mandate_Type, Parm1, Agency_Description, CaseNo, Appellant, Appellee, Lt_Cases, Opinion_Date, Chief_Judge...

Part and Inventory Search

Back
Top