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

    continuing thread68-1421332 Using MS Query to get data from Excel

    Hey Skip, thanks a lot for the input. As I needed a dynamic way of adapting the connection- and SQL-strings of all querytables to the path where the workbook is opened from, I've applied the following solution: Created 3 functions to update the conn-string, SQL-string and refresh the...
  2. flyover789

    Question on Using MS Query to get data from Excel

    done. and thanks a million so far! Martin Typos, that don't affect the functionality of code, will not be corrected. Martin Serra Jr. www.mserrasystems.eu Database_Systems and _Applications shared across all Business_Areas
  3. flyover789

    continuing thread68-1421332 Using MS Query to get data from Excel

    Hi again, my question was: extremely enlightening answer from SkipVought was: Many thanks, Skip so far!! I will not post the whole result of the two function in here (business privacy) .... but here are two neutralized examples (one for the connection string, one for the SQL) that show...
  4. flyover789

    Question on Using MS Query to get data from Excel

    Hey, I have a question on the FAQ faq68-5829 by SkipVought. I'm using the exact technique Skip is describing for building a little reporting tool in Excel. My problem is, that when the Excel workbook that contains the data source and the queries is moved to another location (e.g. forwarded by...
  5. flyover789

    Return COUNT for all items in Table

    something like SELECT TYPES.NAME, COUNT(SCHEDULE.TYPE) FROM TYPES LEFT JOIN SCHEDULE ON SCHEDULE.TYPE = TYPES.ID WHERE (SCHEDULE.DATE Between #1/1/2005 And #10/1/2005#) OR SCHEDULE.TYPE IS NULL GROUP BY TYPES.NAME HTH, fly Typos, that don't affect the functionality of code, will not be...
  6. flyover789

    Use VBA to change query criteria

    dear colleagues, this is off topic, but I'm gonna fly to Chicago, IL, tomorrow and be in Deerfield, IL, until next friday (Sep, 16) ... business travel ... anyone of the tek tips coreteam send me a note if there is an opportunity to meet ... Best regards, Martin Typos, that don't affect the...
  7. flyover789

    Use VBA to change query criteria

    Good [morning] imho there are scenarios where it can make sense to change the query slq via VBA, e.g. if you don't want user interaction and grab the criteria from somewhere automatically ... WaltW: using the search function is always recommended. here is the answer to your particular...
  8. flyover789

    Add item to table field Based on another Field

    should be no problem, but why not simply use a query with a calculated field? iif(Field1 = number; calculation1) as newfield HTH, fly Typos, that don't affect the functionality of code, will not be corrected. Martin Serra Jr. www.mserrasystems.com Database_Systems and _Applications shared...
  9. flyover789

    Query only the latest values

    SELECT Company, Max([Date]) AS Latest_Date FROM summary Group BY Company; You should avoid using reserved words (like "Date") as field names in your tables! HTH, fly Typos, that don't affect the functionality of code, will not be corrected. Martin Serra Jr. www.mserrasystems.com...
  10. flyover789

    Split value

    as far as I see this can only be done with VBA: Function testsplit() Dim db As DAO.Database Set db = Application.CurrentDb Dim rs As DAO.Recordset Set rs = db.OpenRecordset("tbl_TestSplit") Dim ary ary = Split(rs.Fields(1).Value, ";") rs.MoveLast rs.MoveFirst Do Until rs.EOF Debug.Print...
  11. flyover789

    Opening a Form on Load

    in the access menubar go to tools->startup ... in the "display form/page" combobox select your form. this will open your form on startup of the DB. HTH, fly Typos, that don't affect the functionality of code, will not be corrected. Martin Serra Jr. www.mserrasystems.com Database_Systems and...
  12. flyover789

    Check if text box needs scroll?

    Hi jwruble, don't know of a way to always show the scrollbars of a textbox, but the additional text to be displayd if the text in the box is longer than a certain number of characters, is easy: add a label on your form like "theres more to read ..." find out the number of characters, that can...
  13. flyover789

    Convert SQL Server Query Code To MS Access Code - HOW??

    like that? SELECT max(dbo.Actions.ActionDT), Last(dbo.Invoices.InvoiceID) FROM dbo.Invoices INNER JOIN dbo.Actions ON dbo.Invoices.InvoiceID = dbo.Actions.InvoiceID GROUP BY dbo.Invoices.InvoiceID ORDER BY dbo.Actions.ActionDT ASC, dbo.Invoices.InvoiceID ASC; HTH, fly Typos...
  14. flyover789

    Find First Problem

    like that? rs2.FindFirst "acctnmbr_out= '" & rs1!AcctNmbr_Out & "' And rectype_out = ""01""" 'FIND First 01 REc this is assuming acctnmbr_out and rectype_out both are stings HTH, fly Typos, that don't affect the functionality of code, will not be corrected. Martin Serra Jr...
  15. flyover789

    Reference table modified date

    are you referring to modifications on table properties or the data in the table? the date and time when the properties of a table have been modified can be found with something like: Function dateupdated() Dim db As DAO.Database Set db = Application.CurrentDb Dim tdf As DAO.TableDef Set tdf =...
  16. flyover789

    Filter listbox based on subform

    1. the WHERE clause should be before the ORDER BY clause. 2. to get the value of the cbobox on the subform use: [Forms![frmJobRep]![sfmJobRepDet]!cboManuf.value with [sfmJobRepDet] being the Name of the subform-control. HTH, fly Typos, that don't affect the functionality of code, will not be...
  17. flyover789

    Changing Query Criteria via Code

    i've tested the a.m. code, and it worked ... Good luck, fly Typos, that don't affect the functionality of code, will not be corrected. Martin Serra Jr. www.mserrasystems.com Database_Systems and _Applications shared across all Business_Areas
  18. flyover789

    Changing Query Criteria via Code

    ...left and right part of the existing SQL ... something like strSQL = Left(qdf.Sql, InStr(qdf.Sql, "WHERE") - 1) & _ " WHERE yourCritField Like ""*yourCritVal*"" " & _ Right(qdf.Sql, Len(qdf.Sql) - InStr(qdf.Sql, "GROUP") + 1) Just a thought, fly Typos, that don't affect the functionality...
  19. flyover789

    Printing a report from a form

    in your query: ... WHERE [incident number] = Forms!yourForm!txt_Incident_Number txt_Incident_Number is the name of the control, that holds the incident number to be pulled by the query. HTH, fly Typos, that don't affect the functionality of code, will not be corrected. Martin Serra Jr...
  20. flyover789

    Changing Query Criteria via Code

    you can edit the SQL of a saved query via VBA as follows: Dim strSQL as String Dim db as DAO.Database Dim qdf as DAO.Querydef Set db = Application.CurrentDB set qdf = db.Querydefs("yourSavedQueryName") strSQL = "SELECT ... FROM ... WHERE ....;" qdf.SQL = strSQL HTH, fly Typos, that don't...

Part and Inventory Search

Back
Top