Recent content by Domski74

  1. D

    update query with subqueries, not updateable

    Hi All I'm trying to set a day count based on the number of days in the year and take account of possible leap years. The table only ever contains a years cumulative data and the day count needs to run from the first of April and be flexiable enough not to need maintenance to account for a new...
  2. D

    Code flow after opening form in VBA

    Hi All I have some code that works fine in Access 2000 but not in 2007, it's from lebans HTML editor (if you're familiar), it goes like this: Private Sub cmdEditHMTL_Click() On Error GoTo Err_cmdEditHMTL_Click If IsNull(Me.testmemo) Then Me.testmemo = "" End If DoCmd.OpenForm...
  3. D

    Multiuser form readonly data lock out other users

    I made the query editable but locked all the fields so only the button could do the edit. Then when the button was pressed I made a harmless edit like me.field = me.field, this locked the record. Also in the button I perform a check to see if the record is locked and if it is I output a...
  4. D

    How can I make this query editable?

    Actually it wasn't possible (that I could see) to make this query editable using subforms. In the end I made the query into a make table and pointed my form at the table instead - meant I had to redesign my db but it did the trick.
  5. D

    How can I make this query editable?

    Thanks for your reply! The link in the query is to exclude records that exist in both (EMPID, CC and SUB) so it has outer joins with null for those fields - would this work in the way you describe? Please can you elaborate? Thanks :)
  6. D

    How can I make this query editable?

    Hi All I have a query that I use as the data source for a form but it isn't editable - I need it to be. here's the query: SELECT Tbl_PayrollData.Acc_Code_CC AS CC, Tbl_PayrollData.Acc_Code_AC AS SUB, Tbl_PayrollData.Employee_Id AS EMPID FROM Tbl_SubstantiveStaffLatest RIGHT JOIN...
  7. D

    Multiuser form readonly data lock out other users

    Hi All I have a form linked to a read only query. I need to be able to lock out other users from pressing buttons on this form when someone else is viewing the particular record (viewed the record first)? The button has the effect of performing updates elsewhere that effect the readonly...
  8. D

    Pass text date to query

    backslashes! What a moron I am. It's been a long week! Thanks for all your help. Domski.
  9. D

    ADO Export to Excel, Error on rs.Open

    Hi there, I put together a subroutine that uses an ado recordset based on an existing query, it's worked before but doesn't work in my current query? The code is as follows: ... 'BUILD RECORDSET With rst .ActiveConnection = CurrentProject.Connection...
  10. D

    Pass text date to query

    DateSerial did the trick - thank you so much!! D
  11. D

    Pass text date to query

    Thanks for the reply. Are you saying I should do the conversion in vba? I was using the datevalue function to try to convert it in the criteria section of the query. When I try this in vba it says type mismatch? x = DateValue(Me.cboDay & "\" & Me.cboMonth & "\" & Me.cboYear) Please...
  12. D

    Pass text date to query

    Hi All I have a form that has 3 combo boxes for the user to enter a date, one each for day, month and year - so far so good. The problem I'm having is trying to pass this date into a query, I have the query criteria as dateValue([forms]![cboDay]&"\"&[forms]![cboMonth]&"\"&[forms]![cboYear])...
  13. D

    ADO Count records in existing query

    I was using Dcount to count the rows of a query containing multiple very large tables, so I guess that's why it's slow. Can anyone help as to why my code falls down when I try to get a count of a query rather than a table? thanks.
  14. D

    ADO Count records in existing query

    "DCount is an 'domain aggregate' function and is slow"
  15. D

    ADO Count records in existing query

    Hi All, I've been using DCount to count records in an existing query, however I was finding this to bwe a very slow function and thought I could speed it up using ADO, my code is as below: Function GetRecordCount(TableName As String) As Long Dim rs As New ADODB.Recordset Dim ssql As...
Back
Top Bottom