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

    Renaming Column Headers in Excel using VBA

    I'm manipulating tables in Excel using Visual basic and as part of the code I would like to remove all text enclosed in parentheses from column headers - see below From To Ive been attempting to use the example formula using VBA but cannot make it work =LEFT(D1,FIND(" (",D1)-1) and...
  2. fishtek

    Enumerate Grouped Records in a Query

    dhookom: I believe I had a minor syntax error. I reworked the query and all is working fine now. Thanks so much for your help!
  3. fishtek

    Enumerate Grouped Records in a Query

    Thanks dhookom. When I insert the SQL code you provided into the query I get the following message: Any suggestions? Thank You
  4. fishtek

    Enumerate Grouped Records in a Query

    Thanks genomon: The SQL is as follows: SELECT tblPhysData.ColNum AS ID, tblPhysData.Depth FROM tblStationInfo INNER JOIN tblPhysData ON tblStationInfo.ColNum = tblPhysData.ColNum ORDER BY tblPhysData.ColNum, tblPhysData.Depth; So where I'm stuck is how to add a Depth_Enum field that...
  5. fishtek

    Enumerate Grouped Records in a Query

    Im trying to enumerate grouped records in a query. Please see table below. The query is grouped and sorted by ID then depth. When I run the query I would like Depth_Enum to enumerate the depth values based on the grouping. Any suggestion would be appreciated. Thank You
  6. fishtek

    Dates in Consecutive Quarters

    Thanks BigRed1212: I'm having trouble making this code work. I tried it in the SQL window of the query but keep getting error messages. Can this code be modified to work in a module then called up from a report? Thanks Again select sum(streak) as con_fails from ( SELECT...
  7. fishtek

    Dates in Consecutive Quarters

    There will only be one record per quarter and I am only concerned about the test date. thanks
  8. fishtek

    Dates in Consecutive Quarters

    Thanks guys. See the example below. The result would be a test fail that occurred in three consecutive quarters with a total of 5 fail events. Again, I am looking for Access to look at an array of dates and tell me how may fails occurred in consecutive quarters. In this case 3. Thanks 2009...
  9. fishtek

    Dates in Consecutive Quarters

    Thanks dhookum, can I use a variation of DateDiff("Q",date1,date2) = 1 to give me a count of ocurrences in a list of dates. In other words, I have a list of dates on a report where an event occurs and I would like Access to tell me how many times the event occurs in consecutive quarters...
  10. fishtek

    Dates in Consecutive Quarters

    I'm trying to figure out a query statement that would identify when 2 dates occur within consecutive quarters (but not the same quarter). I've been messing around with DatePart and DateAdd but not getting very far. Thanks for any help.
  11. fishtek

    Prevent Duplicate Child Records?

    I have a station ID table connected to another data (species code) table via one to many relationship using the station ID. Users enter species codes for a station using a form. How can I prevent a user from entering duplicate species codes for a particular station ID. In other words its ok to...
  12. fishtek

    strWhere when field is Boolean

    I would like to use strWhere to search a boolean field. Can someone provide me with the proper syntax? See similar code below. Dim strWhere As String strWhere = "1=1" If Not IsNull(Me.chkPaid) Then strWhere = strWhere & " AND [Paid] Like """ & Me.chkPaid & """ " End If Dim stDocName As String...
  13. fishtek

    Condense rows in a query

    Thanks dhookom and PHV. Looks like it works.
  14. fishtek

    Condense rows in a query

    Thanks PHV. The SQL code is as follows: SELECT tblFacility.Facility, tblTesRec.[Test Date], Year([Test Date]) AS [Year], tblTesRec.Result, IIf(Month([Test Date])=1,[Result],"*") AS Jan, IIf(Month([Test Date])=2,[Result],"*") AS Feb, IIf(Month([Test Date])=3,[Result],"*") AS Mar...
  15. fishtek

    Condense rows in a query

    I have a query that returns the following with each row representing a different date in 2008: Facility Year Jan Feb Mar Apr Dare County 2008 Pass * * * Dare County 2008 * * * Pass Dare County 2008 * Pass * * Dare County 2008 * * Fail * Is it possible in the query to condense the rows like...
  16. fishtek

    Extracting whole numbers and decimals from text field

    I have a query with a text field similar to the following: Fail <24 >24.6 Fail >100 <45 >100 Fail 77 59.9 I am using the following code to extract numbers from the text but the decimals are removed. Problem is I would like to keep all decimals in the numbers. Public Function getNum(myField)...
  17. fishtek

    Date stamp in table for when record was last exported

    Thanks. Both suggestions were a huge help.
  18. fishtek

    Date stamp in table for when record was last exported

    I am pulling data from a table via a query to be exported to excel. I have created a field in the table to display a date when the record was last exported. How do I date stamp the field to show when I queried/exported the record? Any help would be appreciated. Thank You

Part and Inventory Search

Back
Top