Search results

  1. VilaRestal

    Setting a default image on a form

    To change all 1400 empty paths to the default is a simple SQL update query: something along the lines of: UPDATE Students SET Photo = "\\server\photos\shool.jpg" WHERE Photo IS NULL You can assign Default Values to the Photo field and require it not to be null so it will always be the school...
  2. VilaRestal

    Get Subform Control Properties from Code within the Source Object

    In a module there is a function that takes a Form as an argument: Public Function FormRecordCount(ByRef frm As Form) As Long . I can work out if the form is a subform by seeing if it has a parent: On Error Resume Next Dim bSubform As Boolean bSubform = (Len(frm.Parent.Name) > 0) (If...
  3. VilaRestal

    Story

    but he'd eaten
  4. VilaRestal

    Story

    Ozymandias, who replied
  5. VilaRestal

    complex schedule / appointment book

    I don't think anyone could misuse any of the data that was there. It's just really in case anybody sees their own name in there. Highly unlikely I'm sure but better not to leave it posted for long ;) As I said, I'll get on to this in a day or two.
  6. VilaRestal

    complex schedule / appointment book

    OK, thanks for redoing the code and uploading the database. Leave it with me for a day or two to give a considered answer. (Very busy at work at the moment.) I should say that those names don't look random to me and nore do the appointments. I think you should edit that post and remove the...
  7. VilaRestal

    complex schedule / appointment book

    Ouch my head hurts reading that. To make it a bit easier to read could you edit the above and put it in a Code block (by clicking Go Advanced) with the indentation intact please? You may need to re-copy the code over what you've done to do that. Also a full recap on what tables and fields and...
  8. VilaRestal

    Story

    ?" said Betelguese to
  9. VilaRestal

    complex schedule / appointment book

    You could base it on a normal query that outputs the three fields you want: Format(DateTime, "hh:mm") Employee FirstName & " " & Surname Then they would be the Row, Column and Total = Last fields of the crosstab respectively. The underlying query would be parameterized to filter for only a...
  10. VilaRestal

    complex schedule / appointment book

    OK, for your first question: Yes that's how you would handle the textbox events. In better languages you could do something like: Private Sub txtClick() Handles txt1.Click, txt2.Click, txt3.Click etc but in VBA each control has to have its own event handler but that can be a one liner call...
  11. VilaRestal

    complex schedule / appointment book

    Well the subroutine that does it is PopulateForEmployeeAndDate. You'd need to adapt that for your tables. I don't quite get the structure. Employee is stored in the subtable (tblOrdersItems). The appointments appear to be the parent table (tblOrders - they have a [time start] field). So each...
  12. VilaRestal

    Compile Error: Invalid Qualifier

    Also Set rs_filtered = rs.OpenRecordset is not something I'm familiar with but I don't think it does what you think it will. The MS Help on it is useless: http://msdn.microsoft.com/en-us/library/office/bb243120(v=office.12).aspx Why not just ditch rs_filtered and use rs?
  13. VilaRestal

    Compile Error: Invalid Qualifier

    Well, the .Value aside, the line: Set rs = DB.OpenRecordset(STR_SQL, , dbOpenDynaset, dbReadOnly) should be Set DB = CurrentDb Set rs = DB.OpenRecordset(STR_SQL, dbOpenDynaset, dbReadOnly) (one too many comma)
  14. VilaRestal

    Can't get Nz function to work

    (NOLDBA_INT_CASE_STATUS.IV_D_DO_CODE)=WW should be (NOLDBA_INT_CASE_STATUS.IV_D_DO_CODE)="WW"
  15. VilaRestal

    Text box on a form SOMETIMES has problems

    So, if you put another textbox below txbCalculate and call it txbResult (and set it to locked and not enabled) and put a button on the form next to txbCalculate with the caption "Calculate" and call it cmdCalc then the following code: Private Sub cmdCalc_Click() On Error Resume Next...
  16. VilaRestal

    Story

    wanting to be
  17. VilaRestal

    Text box on a form SOMETIMES has problems

    To understand it: It boils down to txbCalculate = Eval(txbCalculate) with slightly OTT error handling and comments From the Access help: "You can construct a string and then pass it to the Eval function as if the string were an actual expression. The Eval function evaluates the string...
  18. VilaRestal

    Conditional Formatting

    Part of the problem is that this is an Excel question in an Access forum without mentioning that it was. mdlueck may be a bit annoyed about you not mentioning that. As for your code, firstly: Why is the range passed as a string to this sub? Surely better to pass the range as a reference...
  19. VilaRestal

    flashdisk

    The only way I can think of is by the quite ugly method of putting a file on the drive with a peculiar name and then using fso to find if the file exists. Something like: Dim fso As Object Set fso = CreateObject("Scripting.FileSystemObject") Dim i As Integer Dim GotIt As...
  20. VilaRestal

    Compile Error: Invalid Qualifier

    It's just Me.RecordSource (no .Value)
Back
Top Bottom