Search results

  1. M

    Expression Builder: If And Or

    I have an old expression which works fine: =IIf([DutyType]='O' Or [BobNewNear]=0,0,IIf([BobNewNear]<6,6,[BobNewNear])) I am now in a situation that I have to add a new [DutyType] so now I have also H to add as of a duty Type, therefore if Duty Type is O or H has to return 0, anything up to 6...
  2. M

    Compile Error In Query Expression

    Hi, I had to reinstall Microsoft Office Package an I have now an issue with a DB I have been using for years, it is stuck on a Splash Form, I have removed the splash form by setting the DB to open on the main form which it use to open after the Splash Forms but I am getting the error as in...
  3. M

    Sum If in footer

    I have a form in datasheet view with multiple entries, one column named 'amount' containing amount and the other column named 'Type' containing a single letter (P as Payment and D as Deduction) the datasheet can contain payments and deductions. I need to place two unbound text boxes in the...
  4. M

    Lookup after update

    I have a DB tracking payslip entries which ultimately flags discrepancy with payments. I am looking at a look up to copy a value from the main form to a subform once the amount has been entered in the subform with possibly a after update (or any other more appropriate solution. with reference to...
  5. M

    After Update Event on Tab Stop set to NO

    I have a form with a combo box that reads data from a table, I have the below code on the after update event which populates two more fields which populates if I scroll through with the tab, however if I set the Dep & Arr properties to tabs stop = no these fields do not update. How can I...
  6. M

    Copy Value to Form

    I have a form which is inserted in another form, by double clicking on a specific field it opens a 'Help' form with a list of parameters; I want to double click on one parameter (Field) and copy that value to my previous form in the field I have double clicked. I have the following code which...
  7. M

    Display correct value

    I have a form with various calculation fields to calculate and display the difference between two dates/times and rounding this up to the nearest quarter of the hour (measured in 0.25, 0.50 or 0.75 for pay calculation) (Pic attached = Start date - End Date - Tot Mins - Hours - Mins - Round Up)...
  8. M

    Correct Form

    Hi All, I have a form with a field with the following calculated time: =DateDiff("n",[DtStart],[DtEnd])\60 & ":" & DateDiff("n",[DtStart],[DtEnd]) Mod 60 This works fine, however I have an issue with the format; if the result is 5 hours 20 minutes the result will be 5:20, however if the...
  9. M

    Copy result to table

    I am stuck to something very basic.... I have a field in a form that calculates the time elapsed between two times, I would like to copy/embed the result in the table that the form is linked on the after update. I am aware that this is not the best approach as it makes the table heavier with...
  10. M

    Click Vs Double Click

    Following yesterday post that went missing after the crash.... As click and double click on the same text box can be tricky I need to be able to double click on a text box that if it empty will open form A if it has a value already will open form B. I was recomended yesterday to use the If Else...
  11. M

    Passing Data From One Form To Another

    I have a fully functional DB with a few falls, one of these is a form where I enter numeric data as a known staff number which would populate employees details in other text boxes in the form, when the staff number is not known clicking on another text box would open another “Help” form (Default...
  12. M

    VBA Errors

    I am trying to set up a rather simple Journal tracker based on a primary entry and secondary entries with updates, most of it works but I have some glitches: The main form has mandatory fields such as description and status, if no text is entered and it will not save the record nor it will give...
  13. M

    Drop Down showing incorrect format

    I have a datasheet form with a drop down list records are displayed with a dash after the first letter, suddenly for all new entries the dash does not show (Pic1). In the table they are displayed correctly. Would I need to impose the format type as "L-LLLL" on the source in the source in the...
  14. M

    Refresh Another Form On Form Close

    I need to refresh a form after I added a new record from a popup form, I am aware of the requery function but I am struggling to put it in place; I believe I should ad a line on save comand which closed the popup form. the code is: Private Sub CmdSave_Click() On Error GoTo Err_CmdSave_Click...
  15. M

    Error On Filling Field

    I have have made some minor changes to a form and I am now having an error once I filled the field on the form and I press tab to go to the next field, the error is Run-time error '-2147352567 (80020009)': You can't assign a value to this object And the debug is as picture attached, any ideas?
  16. M

    Login Form with User Level

    I have the following code which is not working as it should... all users work in different department (currently 3: IBM, OPS and ADM) these values are set in the tblUser under Department depending in which department the user is it will open the appropriate Main Form, Unfortunately it is not...
  17. M

    How do I restrict editing but still allow access to headers and footers?

    I have a form that displays data in 'Continuous Form' and the following settings in the property form, the record source is from a query: - Data Entry = No - Allow Additions = No - Allow Deletions = No - Allow Edits = No - Allow Filters = Yes This is perfect as when the form is opened...
  18. M

    Autopopulate field

    I am looking to populate automatically one field in the same record with a value as per picture attached: the username has to be the same as the staff number but beginning with a letter...
  19. M

    Auto upload picture

    I currently have a form for all staff which has a an option to add a photo with the following: Private Sub CmdAddPhoto_Click() On Error GoTo errHandler Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog fDialog.AllowMultiSelect = False...
  20. M

    Combo Bow to drop down on selection

    I have placed the following code in either the On Change and Got Focus event for a Combo Box as I would like to automatically dropdown the Combo Box list to display available values when the box is selected directly or through the tab function rather than having to click on the down arrow, but...
Top Bottom