Search results

  1. VilaRestal

    Story

    be visited upon
  2. VilaRestal

    remove multiple listbox items

    Or slightly improved version (only loops through selected items to build ip the array, not all items): Dim iSelectedIndexes() As Long Dim iSelCount As Long iSelCount = lst2.ItemsSelected.Count - 1 ReDim iSelectedIndexes(iSelCount) Dim itm Dim i As Long For Each itm...
  3. VilaRestal

    remove multiple listbox items

    You could do it with an array: Dim iSelectedIndexes() As Long Dim iSelCount As Long iSelCount = lst2.ItemsSelected.Count - 1 ReDim iSelectedIndexes(iSelCount) Dim i As Long, j As Long For i = 0 To lst2.ListCount - 1 If lst2.Selected(i) = True Then...
  4. VilaRestal

    Log on form coding issue

    Of course, it's because the form has already closed and the code is referring to the combobox. Change it to: 'Close logon form and open splash screen Dim iEmp as Long iEmp = Me.cboEmployee DoCmd.Close acForm, "frmStartUp", acSaveNo If Nz(DLookup("Admin", "Technicians", "[ID]=" & iEmp),0) Then...
  5. VilaRestal

    Microsoft Access is redundant technology and no longer supported by Microsoft

    I love the contradiction between these two lines: "A significant number of databases appear to be inactive and are taking up costly storage space." "Many are being used to control and manage valuable customer and business information." and I assume when they say "Microsoft Access is redundant...
  6. VilaRestal

    Story

    , there was never
  7. VilaRestal

    Log on form coding issue

    Something like: If Nz(DLookup("Admin", "Technicians", "[ID]=" & Me.cboEmployee.Value),0) Then DoCmd.OpenForm "frmAdm" Else DoCmd.OpenForm "frmUser" End If to replace the DoCmd.OpenForm "frmAdm" line
  8. VilaRestal

    date in vba ??

    OK, [Created Date] needs to be 'defined' in the report's recordsource. I can't tell whether it is. I'm guessing it will be a field in a table that forms part of the recordsource. Once it is then the following should work: Dim strr As String strr = "dept='" & Text2 & "' AND [Created Date]...
  9. VilaRestal

    date in vba ??

    Sorry, I meant is it a field in the recordsource of the report. Perhaps it should be [Created Date] instead
  10. VilaRestal

    date in vba ??

    changeddate? Do you mean CreatedDate? (changeddate isn't mentioned here) Is that a field in your table? If not then that's why it's asking for it. Otherwise, do you get it asking for parameter when you open the report manually (without this filter)?
  11. VilaRestal

    date in vba ??

    You've put the CreatedDate Between clause in single quotes. I guess that gets converted to True. It should be strr = txtdept2 & " AND CreatedDate BETWEEN #" & DTPicker0 & "# AND #" & DTPicker1 & "#" By the way, is there a reason you're setting focus to Text2 and using its Text property? I...
  12. VilaRestal

    Can anyone solve this

    My code assumed YearDate was a number and a number it should be. If there's nothing other than numbers stored there then converting it to a number data type should not result in any loss of data and will be better in every way. Otherwise we're going to have to modify the code a bit to deal with...
  13. VilaRestal

    Multiusers "hang"

    It hangs surely because it's recursive, it's an infinite loop. It's not using LinkTableDefs as a variable with an assigned value it's using the function. I just don't get why it doesn't hang for every user in every situation :s
  14. VilaRestal

    Multiusers "hang"

    Shouldn't it be If tdf.Connect <> ";DATABASE=" & TempVars("BE_Location").Value Then rather than If tdf.Connect <> ";DATABASE=" & LinkTableDefs Then which would be a recurssive call to the LinkTableDefs function from within the LinkTableDefs function
  15. VilaRestal

    Do I need two seperate tables, or 1?

    The only speed improvement would be where all the tables are queried at once. When just looking at a particular test type then it would actually be a little quicker to have them in separate tables. But speed becomes an issue when there are more than just a few thousand records. The only real...
  16. VilaRestal

    Do I need two seperate tables, or 1?

    There will be a lot of commonality between the tests (patient, date of sample, date of test, etc) but there may well be a lot of differences. From what I know about medical tests then they would each probably need quite a few of their own fields so it may be best to keep them in separate tables...
  17. VilaRestal

    Do I need two seperate tables, or 1?

    Firstly: "A named carer will never be the doctor, BUT the doctor CAN be the named carer" is of course a paradox. I suggest the best way would be to have a Professionals table with two Yes/No fields - Doctor, Carer and then each of the foreign keys in the Patients table would link to this table...
  18. VilaRestal

    Return Objects width and height after anchoring has taken effect

    With tabbed forms (always maximized) I don't think it's going to be possible without some quite complex API calls.
  19. VilaRestal

    Return Objects width and height after anchoring has taken effect

    Yeah it's because Access opens the form with the size of the design window. And that doesn't count as a resize. You need to save it in design with the design window the same size as the area of the form. And not tabbed documents. That will resize the form on load without a resize event.
  20. VilaRestal

    Return Objects width and height after anchoring has taken effect

    "I appreciate the help but the issue is even after the control has been resized using anchoring I get the same width and height values that it had before the load." That's what the code is for. That is normal behaviour. You need code like what I posted to get the width and height at runtime (if...
Back
Top Bottom