Search results

  1. C

    Count between Date issue

    Hi Sam Something like below will work, you will just need to replace the 'vbMonday' in the DatePart function with what ever the day of the first invoice period is. It then shouldn't matter which day you run the query on. Hope this helps Dave
  2. C

    Listbox to select record in Read Only Mode

    Worked a treat - Thanks for your help Dave
  3. C

    Listbox to select record in Read Only Mode

    Hi I have a form which uses a listbox to display a given record but when a user without edit rights opens the form in read only mode DoCmd.OpenForm stDocName, , , stLinkCriteria, acFormreadOnly The user is unable to use the listbox to select a record to view. I have also tried opening the...
  4. C

    Changing Listbox Text Color

    Hi All I have an unbound listbox on a form which displays a list of staff, both past and present, based on an SQL query. I want to be able to differentiate between current and past staff using different colors, i.e. Black text for current employees and red for employees who have left, based...
  5. C

    xxxxx

    You could have a separate table with all of your food items in and then use a combo box linked to the table to list all the different food items.
  6. C

    Default display record from filtered list box

    Thanks Goh but that didn't work. I eventually did a work round fudge by setting focu to the ListBox and then sending keystrokes (SendKey "{TAB}") to move focus around the form in the background, which appears to work. Not an ideal solution, I know, but if it works - don't fix it! Cheers Dave
  7. C

    Default display record from filtered list box

    Hi All I have a form which displays records based on a selection from a list box on the form. The default record displayed when I load the form is record 1 from the table, this is not an issue when I initially load the form but I also have options to filter the records displayed in the list...
  8. C

    Filter SubForm using "Like"

    Ignore last post - just realised I can use 'ListCount'. Thanks for your help Dave
  9. C

    Filter SubForm using "Like"

    Thanks, still not working. I've decided to change the subform to a list box and the dynamic sql works fine with this. However, is there a way to count the number of records returned by the SQL so that I can hide the list box if no records are returned. Thanks Dave
  10. C

    Filter SubForm using "Like"

    Yes, I originally had Requery in place of Refresh but the result is the same.
  11. C

    Filter SubForm using "Like"

    I have tried this and also copied and pasted examples of the created SQL code into a new query and also into the subform and it works fine in both cases, it just seems to be when I run it through VBA code that it doesn't work.
  12. C

    Filter SubForm using "Like"

    Hi All I am trying to apply a filter to a subform using the text filter Like "*text*" by setting up a dynamic SQL query for the subform, see code. The issue I have is that the SQL doesn't seem to apply to the form because it isn't filtering the form. If Not IsNull(Me.ID) Then...
  13. C

    Manage Users and Permissions

    Hi Marvin Thanks for your advice. Although I run A2010 a lot of the DB's are in 2003 format for compatibility across other machines. Apparently the security wizard set up a user level access with my account on all other FE DB's on my PC (I don't know why!) - I deleted the user account in...
  14. C

    Manage Users and Permissions

    I have a database which I have set up to manage users and permissions using the user level security wizard to set up users for a specific database. The issue I have is that it has now set user level restrictions on all of my databases, not just the one I wanted it on. Have I done something...
  15. C

    HELP! - Type mismatch error

    Thanks for all your help. I'll re-visit this when I have a bit more time to see if I can figure out where the conflict is. But as for now I'll make do with the DatePart function. Cheers Dave
  16. C

    HELP! - Type mismatch error

    I have a field in the database called 'PubYear' and the control on the form has the same name, there is also a field called 'DateCreated' with a corresponding control on the form. I don't think these should conflicty. However - on a bright note the DatePart function works fine and, whilst I...
  17. C

    HELP! - Type mismatch error

    No - I only get the first message box and then the type mismatch error. I have even tried using CDate(Date) and Str$(Date) but still get the type mismatch error.
  18. C

    HELP! - Type mismatch error

    Thanks for the prompt response Paul It looks like the Year() code is not being recognised, when I hover the cursor over date is shows 'Date = 03/03/2014' (as you would expect) but when I hover over the Year(Date) statement is shows 'Year(Date) = <Type mismatch>' - which doesn't make any sense...
  19. C

    HELP! - Type mismatch error

    Hi All - hope you can help. I am trying to get a year value from the current date, the code is:- Dim CurrentYear as Long CurrentYear = Year(Date) However every time I try to run the code I get a Type mismatch error(error code 13). The really frustating part is that I have two similar...
  20. C

    Use a Combobox to enter a year

    Worked a treat!!! Thanks for your help
Back
Top Bottom