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 dencom 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: *

  • Users: lars7
  • Content: Threads
  • Order by date
  1. lars7

    Separate Ties In Ranking Query

    Hi Guys, I'm using the code below to rank groups of records in a query: SELECT A.[Pay Number], A.[NI Number], A.[Contracted Hours], Count(*) AS Rank FROM tbl1 AS A LEFT JOIN tbl1 AS B ON (A.[Contracted Hours]<= B.[Contracted Hours]) AND (A.[NI Number] = B.[NI Number]) GROUP BY A.[Pay Number]...
  2. lars7

    Calculate Hours

    Hi, How would I calculate the hours between to times ie, 12:00 till 20:00 = 8hrs Thanks in advance. Lars7
  3. lars7

    Date Mismatch in &quot;strwhere&quot; Code

    Hi I’m creating a query with code and attaching a where statement (strwhere2) to get information from 2 text boxes into the criteria of the field [Date Received]. strSQL = "SELECT CoverTable.Ref, LocumRequestInformation.Contact, CoverTable.Available, LocumRequestInformation.Hospital...
  4. lars7

    2 Record Sources For Word Merge

    Hi Guys, I have the following code to merge a word document and the results of a query (code and Job Title) which works fine. Set WordApp = New Word.Application If (Me.TxtQA.Value = "Safe Increase") Or (Me.TxtQA.Value = "Unsafe Increase") Then Set WordDoc =...
  5. lars7

    Removing Part of Code

    Hi, I need to remove part of a code in a field so that I can compare the rest with another code "PTB69REV1". The part I want to remove is always at the end but has a number that will always increase, ie, Rev, Rev1, Rev2, Rev3 up to Rev12 at the moment. I have tried to replace the end of the...
  6. lars7

    Syntax Error In Drop Table Code.

    Hi Guys, I would like to delete an import error report table after my spreadsheet is imported but I am getting an syntax error message, can anyone see why? If TableExists("'Progress to Assim$'_ImportErrors") Then DoCmd.RunSQL "DROP TABLE 'Progress to Assim$'_ImportErrors; "...
  7. lars7

    More than 1 replace in a column.

    Hi Guys, How do I do more than 1 replace in a column, I've tried various versions of this: REPLACE(dbo.tbltruststaff.JobFamily, 'Nursing / Midwifery', 'Nursing and Midwifery') & REPLACE(dbo.tbltruststaff.JobFamily, 'Nursing/Midwifery', 'Nursing and Midwifery') but cant find the right syntax.
  8. lars7

    Query with Criteria for Letters

    Hi Guys, I’m new to foxpro so please forgiven my lack of understanding. I have pieced together the following code from other processes in our system so that I can open a letter with the record set of a query and then write to a table that the letters have been sent. It works fine if it’s run...
  9. lars7

    Echo Not Working

    Hi Guys, I want to use echo on/off around my code on a form but after it's complete the screen is frozen and I need to close the database. DoCmd.Echo True, "Updating..." docmd."Bit of code" DoCmd.Echo False, "Done" I have tried repaint, repaintobject, refresh but nothing works. Does...
  10. lars7

    Turn on/off Animation

    Hi, I have some animation code that works well from the on timer event of the form but is running constantly. What I would like to do is turn it on and off from a command button, does anyone know how I could do this? Thanks in advance. ' code for animation Static sintPic As Integer...
  11. lars7

    Disable Mouse And Progress Bar

    Hi, I have a form with 4 buttons that I import large files from excel or run modules that do some table comparisons. Each of these routines takes time to run and if the user clicks the mouse while running access stops responding. Is there a way to disable the mouse and also bring accesses on...
  12. lars7

    Not in this collection

    Hi Guys, I'm trying to change the names of 3 tables with the following code but I'm getting this error message "Item not found in this collection" Option Compare Database Option Explicit Function RenameTables() Dim db As DAO.Database Set db = CurrentDb Debug.Print...
  13. lars7

    Compare Tables Code

    Hi Guys, I found this code to compare tables in my database and it works great untill it hits this records when I get an error message: "syntax error (missing operator) in query expression ''O'Neill ');'." Can anyone see where the problem is? thanks in advance. Sub...
  14. lars7

    Transfering table to SQL Server

    Hi Guy's, I'm trying to send a table to my server with this SQL code but i get an error message "Expected:=" can anyone see where i have went wrong? Function ODBCConnect() Dim strSQl As String strSQl = "SELECT * INTO [C:\Documents and Settings\Tom\Desktop].[tbltemp] " & _...
  15. lars7

    Msg After Procedure Runs

    Hi Guys, I just converted my first (.mdb) file to a (.adp) but all my stored procedures show a message after running: "The store procedure executed properly but did not return any records." this happens when I click to open the procedure, but I get an run-time error message ('8008') when I...
  16. lars7

    No Data For Mail-Merge

    Hi Guy's, I am trying to open a mail merge file with the following code: Dim oApp As Object Set oApp = CreateObject("Word.Application") oApp.Visible = True 'Open the document. oApp.Documents.Open ("H:\UserName\Review Letter.doc") the word document opens fine...
  17. lars7

    Word Doc's In Listbox

    Hi Guys, How do I get a list of word doc's, from a folder, to show in a listbox in my form. Thanks in advance.
  18. lars7

    Grouping a Union Query

    Hi Guys, I'm having problems with a union query. I can't get it to group in the way that I want, here is the sql of the 2 queries: QueryMainReport1 SELECT QueryRecordSource.Group, tblStaffGroup.StaffGroup, Count(QueryRecordSource.[Pay Number]) AS Staff, Sum(IIf(tblKSF.KSF,1,0)) AS KSF1...
  19. lars7

    Search For Record In SubForm

    Hi guys, I'm trying to set the record source for my main form and search within a subform, from a command button on the main form, to find a record but I am getting a type mismatch error with this code: Private Sub Command10_Click() On Error GoTo Err_Command10_Click Dim frm1 As Form...
  20. lars7

    Dlookup in query

    Hi Guys, This query works fine if there is only one record in tblRecSource but is there a way to do it if there are more than one SELECT StaffList.[Division code], * FROM StaffList WHERE (((StaffList.[Division code])=DLookUp("ServiceCode","tblRecSource"))); or is there another way to do the...

Part and Inventory Search

Back
Top