Search results

  1. stretch66

    Query criteria cannot reference subform

    Tried this in the criteria but still didn't work.....anyone? [Forms]![frmSickEdit]![fmsubSickListEditVersion].[Form]![SickID]
  2. stretch66

    Query criteria cannot reference subform

    Hi, Trying to run an append query for a specific record on a subform but won't recognise the subform control. The Master form is fmSickEdit do I have to reference the Master file in the SQL? The SQL for the query is: INSERT INTO tblDisLetter ( SickID, DateAdvisedDisciplinary ) SELECT...
  3. stretch66

    Date to change font colour

    Hi Michael no...afraid not. Didn't change the colour of the text.
  4. stretch66

    Date to change font colour

    OK what is the obvious mistake here ? It won't run for some reasom and won't keep the brackets either. Private Sub Report_Open(Cancel As Integer) If Me.Date_From = Date Then Me.Date_From.ForeColor = vbRed Else End If End Sub Cheers!
  5. stretch66

    Declaration error

    It's OK I this I got it in the end using: Set TensorData = New Excel.Application Set TensorWb = TensorData.Workbooks.Add Set TensorSh = TensorWb.Worksheets("Sheet1")
  6. stretch66

    Declaration error

    Ok Thanks Peter so I have created a new Worksheet. How do I refer to the Range correctly as I understand if it is not correctly refered to then a memory leak occurs.Private Sub Command0_Click() Private Sub Command0_Click() Dim TensorData As Excel.Application Dim TensorWb As...
  7. stretch66

    Declaration error

    Thanks that worked.........though I cannot get my head round "ADD" as I use the variables constantly in the code and so how does "ADD" work?
  8. stretch66

    Declaration error

    Very New to VBA and keep getting a runtime error, can anyone tell me what I am doing wrong please?:confused: Private Sub Command0_Click() Dim TensorData As Excel.Application Dim TensorWb As Excel.Workbook Dim TensorSh As Excel.Worksheet Set TensorData = New...
  9. stretch66

    Deleting Excel file from Access

    Hi, Using code in Access how is it possible to delete an Excel File. Have tried the Kill statement but cannot get it to work. Any advice greatfully accepted!!!:confused:
  10. stretch66

    Predefining control

    It's Ok managed to sort it out. Just set the default value of that control to previous forms control value. Thinking out loud again!
  11. stretch66

    Predefining control

    Hi, I have two tables one tblContract and tblServices. tblServices includes ServicesID and ContractID. If a new service is required to be added for an existing contract I want to be able to predefine the control ContractID on the fmAddNew but because the forms properties are set to Data Entry...
  12. stretch66

    Adding column values

    Hi, Have inherited this database and they would like me to come up with some report figures. Trying to add together field values which I thought would be easy......but stangely enough it isn't. Think I need to use a crosstab query but tried the wizard and had no luck at all. Can anyone offer...
  13. stretch66

    blank combo boxes used for form selection

    Thanks Rod................sorry for taking so long to get back but had another database to put together. Will take a look.
  14. stretch66

    "OR" Expression Builder

    Hi All, I have the criteria in the expresion builder: [Forms]![fmEmployeeIntro]![EmpKey] Or [Forms]![fmPersonalDetails]![EmpKey] which should allow me to access the same form from either the fmEmployeeIntro form or the fmPersonalDetails form but whatever form I come in from it requests the...
  15. stretch66

    DCount syntax problem

    Arrrrgghhh!!!! Please can someone put me out of my misery have been on this for three days and can't get on with anything else until solved.:confused: :mad: Have revised the test database that will run the type of report that I am looking for. As you will see have two examples of each critera...
  16. stretch66

    DCount syntax problem

    Actually found out this morning it doesn't work, just that the dates were wrong and so the figures actually looked about right.
  17. stretch66

    blank combo boxes used for form selection

    Hi All, Am using a number of combo boxes as selection criteria for a report. The combo boxes are linked to a table, obviously there will be times when no criteria is required and will want to select "ALL" when left blank. Is there a simple solution ? Cheers
  18. stretch66

    DCount syntax problem

    This worked ....the only difference from RuralGuys example is the double brackets around the between statement. DCount("[EmpKey]","tblEmployees","(([StartDate] Between #05/01/05# AND #12/31/05#)) AND [LeftDate] Is Null ")AS ContractB
  19. stretch66

    DCount syntax problem

    Rod, Sorry posted without reading. Have had a number of errors including syntax and calculation, now getting zero for contract B using both codes.
  20. stretch66

    DCount syntax problem

    Have attached a test DB with what I'm trying to achieve if that helps anyone please?!
Back
Top Bottom