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

    I did as you suggested and changed my SQL to strSQL = "Select NZ([Lt_Cases], ""None Given""), Mandate_Type, Mandate_Date, Date_Mandate_Released, Addressee, Appellant, Appellee, CaseNo, Accident_Date, Addressee_Name, Recipients " & _ "From CMS.V_Macro4CoverLetter " & _ "Where...
  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

    I am running this in Word, but pulling information from an Access db. Here is more code. Private Sub btnGetData_Click() Dim conn As New ADODB.Connection Dim rs As New ADODB.Recordset Dim lngConnectionState As Long Dim strSQL As String Dim CurDoc...
  5. trezraven

    Working with null vlaues

    I have created a form using Word 2007 that queries an Access database. If the Access field, LT_Cases is null, I am trying to replace it with the text "None Given". Here is the code I have tried so far. I have used each block of commented code, separately, but to no avail. I get runtime...
  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

    I have created a form using Word 2007 that queries an Access database. The problem is my SQL statement isn't working. For some reason, my entire SQL statement is being skipped and my error message is coming up. After I click ok for the error message I get my search is complete message...
  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)

    I am using Office 2007 and I have created a form that pulls information from an Access database. My problem is the code works fine for the first two records, but it gets jumbled up after that. Below is a copy of my code. Public blnCancelled As Boolean Public rstart As Object Public rend As...
  14. trezraven

    Repeating a table on a page

    Hello everyone. I am using Microsoft Office 2007 and I have created a form that pulls information from an Access database and puts it in a table. I want to have 3 tables per page that are populated with information from the database. My dilemma is I can populate one table, but for some reason...
  15. trezraven

    Help with SQL statement

    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 between to_date('" & IIf(IsNull(DCAMacro.txtStart.Value), #1/1/100#...
  16. trezraven

    Help with SQL statement

    My initial SQL made sense b/c it was giving me information. I saw on another site where Nz (null value) was used, so I tried changing the SQL statement to the following: strSQL = "Select Mandate_Type, Parm1, Agency_Description, CaseNo, Appellant, Appellee, Lt_Cases, Opinion_Date, Chief_Judge...
  17. trezraven

    Help with SQL statement

    I have created a form using Word 2007 that queries an Access database. I want my users to be able to search the database by either entering the type of mandate or a specific date range. My dilemma is my SQL will not let them do one or the other. For this SQL statement they have to enter...
  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