Search results

  1. H

    how to change am or pm based on the time entered

    I have a form where I am capturing StartTime and EndTime of certain events. I have set the input mask as 99:00\ >LL;0;_ My users think it is too much to enter am or pm. What they want is the system to calculate the am pm based on the time entered. If the time entered is between 8:00 to...
  2. H

    Code preventing duplicate entry is preventing edits to the existing records

    Thanks Jiri. Sometimes easy things just don't come to mind.
  3. H

    Code preventing duplicate entry is preventing edits to the existing records

    I have a save button with the following code in the on click event of the button. It does 50 percent of what I want which is to prevent duplicate entry into the database. However, if I try to edit an existing record, this codes prevents saving of the record. What need to be changed in this...
  4. H

    Ranking Query

    Given below is the query that I am using to rank and insert the records into a table. I have nine locations I have separate query for each location which is pretty much find and replace the location name. As I said earlier it's not the most elegant solution but it is working for me...
  5. H

    Ranking Query

    Given below is the query that I am using to rank and insert the records into a table. I have nine locations I have separate query for each location which is pretty much find and replace the location name. As I said earlier it's not the most elegant solution but it is working for me...
  6. H

    Ranking Query

    I have a working solution now. This issue is resolved.
  7. H

    Ranking Query

    Unfortunately we needed a solution in access itself. The solution posted is still working. Thanks for checking out the post.
  8. H

    How to import a directory listing into a table including dates and times

    DrallocD, I used your code taking up some ideas from allen browne's method to insert the file properties in a table. Everything was working just fine until I decided to add file.Duration into the equation. After that I am getting an error message "Error 438(Object doesn't support this...
  9. H

    Unable to setfocus to a control in a subform

    @AccessMSSQL, Thanks for the clarification that this cannot work from the before update event. I will try to follow your suggestion to put the validations on the Save Button.
  10. H

    Unable to setfocus to a control in a subform

    @ RurualGuy, I have cleaned the code as you suggested but still no luck. I am attaching the database just in case if you need to see. I am a rookie so feel free to correct me wherever I am wrong. If Len(Me.Title & vbNullString) <> 0 _ And Len(Me.StartDate & vbNullString) <> 0 _ And...
  11. H

    Unable to setfocus to a control in a subform

    @mdlueck, The setfocus command was part of a code to ensure that the data is filled in the subform if the main form contains the appropriate data. If I have to do it from the subform as you suggested, under which event of the subform should I enter the code you suggested. If Len(Me.Title &...
  12. H

    Unable to setfocus to a control in a subform

    TimeCharged is the name of the Subform control Link Master Field is id (in tblLeaveRequest table) Link Child Field is ID ( in TimeCharged table) They have one to many relationship.
  13. H

    Unable to setfocus to a control in a subform

    I know this topic has been addressed plenty of time and I tried almost every methods discussed on this topic. But for some reason, I am not able to set focus on the control in the subform. The name of my main form is frmLeaveRequest_Add and the name of my subform is TimeCharged On the before...
  14. H

    Code to prevent duplicate entry is preventing editing of existing records

    Thanks. That's exactly what I did.
  15. H

    Code to prevent duplicate entry is preventing editing of existing records

    Thanks for looking. I found the answer. All I needed to do was add an unique field into the where condition and now I can edit the record. Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.Title <> "" And Me.StartDate <> "" And Me.EndDate <> "" Then If DCount("*", "tblLeaveRequest"...
  16. H

    Code to prevent duplicate entry is preventing editing of existing records

    Given below is my code to prevent entry of duplicate record based on three different fields. This code is in the before update event Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.Title <> "" And Me.StartDate <> "" And Me.EndDate <> "" Then If DCount("*", "tblLeaveRequest", "[Title]=...
  17. H

    Ranking Query

    Looks like I am having incremental success. I managed to rank based on multiple fields, but there is no way around using union all to rank it within each unit. I am attaching the completed database in case if it helps someone. Also for someone to help me find a more elegant solution. The...
  18. H

    Ranking Query

    Yes. I did look at the database that MStef provided. What I need is one more column at the end of his data that shows rank. In my situation the ranking has to be grouped under each location and within each location,the category should be grouped and within each category the unit should be...
  19. H

    Ranking Query

    I was also wondering the same thing. I don't think that access supports the ranking function. I know oracle does.
Back
Top Bottom