Search results

  1. M

    display some results

    To do tis you would need to separate the subreport query from the report totals as they are no longer related. So, you would use two queries - one to give you the totals and one to produce the limited record set.
  2. M

    Sum of multiple TIME entries of a table

    Convert your downtime into minutes. What is the date type of this field? If it is a string you will need to use cint, left, instr, right, len and instr. i can give you the formulae if you are stuck on this one. Once you have the minutes you can sum this in your query. I would then write a vba...
  3. M

    Find record on form VBA

    You need to double check the name of the sub form container. Don't forget the name Edit1_Frm in Forms!Edit_Frame_FRM!Edit1_FRM.Form.RecordsetClone is not the name of the form, but the name of the sub form control. They can and often are the same, but if for example you copied the control on the...
  4. M

    Populate field with drop down list

    So, the first query needs to use Group By to limit the duplicate employee codes. SELECT [Employee Code] FROM [Employees tb] Group By [Employee Code] Order By [Employee Code] The second query is straight forward:- SELECT [First Name] FROM [Employees tb] WHERE [Employee...
  5. M

    Find record on form VBA

    Dim rs As Recordset Dim stBookmark As String stBookmark = Me.PIN Set rs = Forms!Edit_Frame_FRM!Edit2_FRM.Form.RecordsetClone rs.FindFirst "PIN = '" & stBookmark & "'" Forms!Edit_Frame_FRM!Edit2_FRM.Form.Bookmark = rs.Bookmark Set rs = Nothing
  6. M

    Find record on form VBA

    Find the record first THEN synch your recordsets. E.g. The bookmark synch needs to come after you have used your find first.
  7. M

    Multi Select Listbox Access 2003 Code gives syntax error in Ms Access 2010

    I do recall having an issue like this on a nested query in Access. I never really got to the bottom of it other than I suspected it was down to the "New" ACE database engine (which was started from 2007 onwards) compiling the query and cocking up the syntax due to query length... My advice...
  8. M

    Create Datesheet based on Any Query or Table

    I am not sure if this is the right place for this post, but I wanted to share some cool code that I use a lot in my Access apps. Almost every app I write the users need some form of on screen report. Normally they want loads of them and cranking out a way of displaying the queries so that I...
  9. M

    Multi Select Listbox Access 2003 Code gives syntax error in Ms Access 2010

    Have you tried injecting your where clause into the above query to see if you get the same error? Can you post the sql for qryContractListSummarybyDateContract2TYPEBREAK as ReportableName is a field of this query? You need to watch the nesting of queries in 2010 as I have found it is pretty...
  10. M

    Multi Select Listbox Access 2003 Code gives syntax error in Ms Access 2010

    In the code above you have no longer got the space you had in your original post for the word ReportableName. Check your table - is the field [Rep ortableName] like it was in your original post or is it [ReportableName] like it is in the above post? If it is [ReportableName] then try changing...
  11. M

    Using a form selection as a query "Field"

    You need to build the SQL up in code really. If you need to save the query you can use a queryDef to create a permanent copy. To use the value as field name is not possible directly, but is simple if you build up your string in VBA. Once the SQL is built you can then either attach it to a...
  12. M

    Multi Select Listbox Access 2003 Code gives syntax error in Ms Access 2010

    OK, can you post the error showing the square brackets around as it would never run the way you have written it above. That space is just wrong in that field. Humour me - run it again but with this code: - strSQL = "SELECT * FROM qryContractListSummarybyDateContract3TYPEBREAK " & _ "WHERE...
  13. M

    Syntax Error (Missing Operator) In Query Expression

    Couple of issues here. The strPreviousTeacher needs to be within double quotes. Either double up your quoates or use CHR(34) to add them. Second, if Record_Date is a date then the date needs to be seperated with a # either side. Depending on where you are from you may also need to form the...
  14. M

    Referencing a Control on a Subform

    What I do to keep it nice and simple is to use the OpenArgs option at the end of the OpenForm method. You can pass any number of open arguments that you want. This can then be reference on the form you are opening by the Me.Args property. I often pass multiple arguments seperated by a...
  15. M

    Multi Select Listbox Access 2003 Code gives syntax error in Ms Access 2010

    You cannot have a space in a field name with square brackets. So Rep ortableName needs to be [Rep ortableName]. That would be my guess...
  16. M

    Find record on form VBA

    May be missing something, but searching in the recordsetclone is one thing, but you then need to set the form recordset to the record you have found. So the line missing at the end is something like: - Forms.Bookmark = rs.bookmark which will sink the recordsetclone to the real recordset on the...
  17. M

    VBA filter

    Form filters are set for the entire data set and are not modified for each row. You need to change your source sql for the form to do what you want to do. I would base the form on a sql statement and then modify this statement to switch on the filter. You could use the above technique if you...
  18. M

    Copy a Control in Form Design

    Thanks Galaxiom, I do love Access. For 20 years now I keep coming back to it for quick solutions no matter what else I am doing. I opted for the loop through the properties technique for this one in the end. I know that all the controls are command buttons so that makes it a little easier...
  19. M

    Copy a Control in Form Design

    OK, I take your point, probably need to give you some background. I am doing some IOS development at the moment and need a RAD tool to design some levels for a game. The tool uses the design mode of an access form to move my game "assets" around to design the level, I then put the form in view...
  20. M

    Copy a Control in Form Design

    This has to be code based. I am working on a solution and will post it here if I get there...
Back
Top Bottom