Search results

  1. H

    Error Number 3078 Occured

    I have a function that creates the audit trail of any changes made on a form. It doesn't work well if there is an apostrophe. So I applied 5 find and replace rules to cover most common apostrophe occurrences. The code fails at db.Execute repsql5, dbFailOnError . I run the result of...
  2. H

    Query truncating memo fields

    I have a query that is truncating a memo field to 255 characters. There is no distinct, group by, format, union or concatenate in the query which are the common cause for truncation. Not sure what is happening. Please advise. Given below is the query. The truncated memo field is comments...
  3. H

    How to bypass the before update event when a record is deleted

    I have a database which is slowly evolving. Users needed a feature to delete some records without a trail and some with a trail from the form. So I added an apply action field in the subform using which they can delete a record without a trail and if they wanted to keep a trail they could do...
  4. 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...
  5. 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...
  6. 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...
  7. 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]=...
  8. H

    Ranking Query

    I have a certain set of data that needs to be ranked based on sorting on 5 different data fields. The ranking is based on sorting at 5 level 1. Location 2. Category 3. Unit 4. HireDate 5. Seniority Score The ranking has to be within each Location and within each category and within...
  9. H

    Using "All" in a Parameter Query

    I know how to display all the records if no parameters are selected on the form. But my user is adamant about having the "All" option in dropdown menu and he would like to see all the records if that option is selected. Currently, the query would display all the records if no selection is made...
  10. H

    Updating the listbox based on a value selected in a combo box

    I have a combo box called Approved. If I select YES from the ComboBox, I want a listbox named ApprovedBy further down on the form to get the name of the user logged in. I put the following code in the AfterUpdate event of the combo box, but it is not generating the value in the list box. I would...
  11. H

    Data Type Mismatch in Criteria Expression

    I am not sure why I am getting this error message. I did use the datevalue function to extract the date part from the field in an odbc linked table Given below are two different version of the queries that tried. Could someone please point out what I am doing wrong. SELECT LOCATION.NAME...
Top Bottom