Search results

  1. T

    Subquery count and sum

    Hi, I am trying to run a query to count orders and sum qty from salesdetail and salesheader tables (count on header and sum of qty in detail) however it seems to be counting all the detail too? It leads me to believe I need to subquery and join however not sure how? SELECT...
  2. T

    runtime 13 data mismatch - SOLVED

    Hi, I have used this code many time shwoever its failing on this occasion, the product in question is for example "0066551 - test product" which appears in the continuous form and the textbox. Private Sub Command9_Click() Dim strWhere As String Dim lngLen As Long Const conJetDate =...
  3. T

    Docmd send object data type error

    Hi, Im getting a data type error when i try the below and cant seem to figure it out? Private Sub Command2_Click() Dim Product As String Product = Me.txtProd.Column(1) If MsgBox("Is Outlook Open?", vbYesNo, "Outlook") = vbYes Then DoCmd.RunSQL "INSERT INTO tblRequestedPallets ( P_Code_Id ) "...
  4. T

    Dynamic Crosstab - Half Workiing FINALLY

    Hi All, So i persevered with the crosstab report and its kinda working and..... kinda not :cool: - its taken a lot a lot a lot of :banghead: The first line of data appears from the query, displayed properly, however im trying to completely remove the totals from the far right box, - ive got...
  5. T

    Dynamic Crosstab Report

    Hi, Would anyone be able to give me some step by steps in creating a dynamic crosstab? i have 2 tables one is pickstats - empid,lines,hours - the other table is tblemp - empid,fname,lname. i query this to give TSM:[fname]&" "&[lname], LPM:[Lines]/[Hours]/60 - i can create a crosstab from here...
  6. T

    Adding text to label caption on timer

    Hi, I have globally defined 'Progress' as integerer and using the following code on my splash screen - i want to add a "." to the end of the label caption until progress = 10 (10 timer events) Private Sub Form_Load() Progress = 0 End Sub Private Sub Form_Timer() Dim Dot As String Dot = "."...
  7. T

    Dlookups just pulling first record

    Hi, I have a dlookup which gets the empid on login - i know this works as i fire a msgbox with this, this is stored in a global variable. i have the following code running on 'form_load' to set securities however its just using the first records and not the ones linked to the specified accont...
  8. T

    Dlookup Issue

    Hi I'm using the following to get a users id number once they login - that part the first line works. however now i want to use that number to check in the permissions table to see if there is a tick in the 'EnterTrade' field and if not then do some action however i cant seem to get it tot work...
  9. T

    Missing Operator Syntax for SQL

    Probably a really simple one however i just can spy the missing part hopefully one of you guys/girls can? Any help would be fantastic.. Dim AppendUsers As String AppendUsers = "INSERT INTO tblPermissions ( empid )" & _ "SELECT tblEmployee.empid" & _ "FROM...
  10. T

    Function in SQL

    Hi i have the following function declared however cant get it to work in the sql string.. Public Function GetSystemID() As String GetSystemID = fOSUserName End Function however cant get it to return the required value in the SQL string.. DoCmd.RunSQL "INSERT INTO tblLogs (LoginUser...
  11. T

    Prevent Duplicate Data Over 2 Fields

    Hi, I currently assign multiple 'skills' to departments using a listbox and a combo using the following code Private Sub cmdSaveReq_Click() Dim strSQL As String Dim db As DAO.Database Dim rs As DAO.Recordset Dim ctl As Control Dim varItem...
  12. T

    Time between records

    Hi, I have a table which has a primary ID and then date/time then an empid field relating to an empid table, Is it possible to design a query to return all records per empid which exceed 30 minutes for the last 30 days? or even 'today' or a specified date whicever is easiest?
  13. T

    the microsoft access database engine does not recognise "

    Hi, When i try to open my crosstab report i get the above error, the same dynamic report works fine in another db file however im stumped by this one, anyone able to help?
  14. T

    Error when opening report

    Hi, When i run the following code to open my report a receive the following error.. error 3070 the microsoft access database engine does not recognise " as a valid field name or expression strDocName = "rptBarcodingMonthly" MsgBox strDocName DoCmd.OpenReport strDocName...
  15. T

    3265 item not found error running VBA Code

    Hi, I'm using the following code on_open of a report which works fine in another DB however when using it here i get the above error. Private Sub Report_Open(Cancel As Integer) ' Create underlying recordset for report using criteria entered in ' EmployeeSalesDialogBox form...
  16. T

    VBA loop fields of crosstab to create query

    Hi, the below code works fine if i run a crosstab on a whole table however if i pass criteria to the crosstab e.g between [forms]![form]![txtstartdate] and [forms]![form]![enddate] it fails and returns null for every field? even though if set docmd.runquery "qryReductionByPhysician_Crosstab"...
  17. T

    Type mismach report On-Open for dynamic crosstab

    Hi, This code runs to the set frm part then i get a type mismatch? ive tried a few different things and still nothing? Private Sub Report_Open(Cancel As Integer) ' Create underlying recordset for report using criteria entered in ' EmployeeSalesDialogBox form. Dim intX As...
  18. T

    Search Query with Subform - Edit records in related table

    Hi, I have a query which looks for like * surname* in tblemployee fname lname dept active this works fine and i can search using a requery button however as deptartments are stored in tbldepts when i change the query to retrieve the dept name instead of number directly from the table and i...
  19. T

    Training DB, requirements against training

    Hi, I have searched however i cant find anything that matches what im looking to do. I already have a db set up on table level for most of what i want tblemp tbldepartments tbltrainingtype (core, additional etc) tbltrainingskills tbltraining_records im struggling now as i need to set up...
  20. T

    Table Structure for Training Matrix

    Hi, I am starting out creating a training database to track training needs and expiring training etc. I'm just looking for some tips as to how to structure the tables and relationships I have an employee table, department table and training type table. However im wondering how i can set up...
Top Bottom