Search results

  1. X

    Update Table from IIf Calculated Form Field

    I have a form (fmERA) which is bound to tblData. In the form I have textbox (txtCentreCalc) which contains an IIf statement. What I am trying to do is update the calculated value of txtCentreCalc into a field (Centre) of tblData but I'm unsure how to do this. Any help appreciated.
  2. X

    Combo Box - Wrong Column in Table

    Hi I have a form with a combo box relating to a table of two columns (autonumberID, Name). The combo box properties are set to col count 2, bound column 2 and column width 0;2. However, column 1 (autonumberID) is written to my main data table instead of column 2 (Name). Can anyone please...
  3. X

    Search and open form

    Hi In a nav form's default subform I want to add a search facility (text box and button). In the button OnClick event I want another subform to open with the searched record. I have the below code for my search button but I don't know what to add to get it to open the result in another...
  4. X

    Compile Error Help

    Not my day today! I'm getting a "Compile Error: User Defined Type Not Defined" error in a module when debug/compiling and the debugger is highlighting the line in red. It worked fine until today so I'm wondering what could cause it. The code is: Sub AuditChanges(IDField As String, UserAction...
  5. X

    DLookup Alternative

    Hi With some help from this forum earlier today, I have managed to get the below DLookup expression working to in the Control Source of a textbox. =IIf([Text63]="Live","Row " & DLookUp("[Row]","[qryLocate]","[Box] = " & [txtBox]),"") However, it is extremely slow, sometimes up to 15 seconds...
  6. X

    DLookup Help

    Hi, I need some help with a DLookup expression in the AfterUpdate event of a form text box, please. I have a query (qryLocate with two fields, Box and Row I want to look up the value of text box txtBoxID in the field Box in qryLocate and return the value in Row. I tried the below but it...
  7. X

    Graph Data Label Format

    Maybe I'm looking too hard but I can't find a way of changing the format of the data labels in a graph. They default to black but I have a dark background so want to change that. Does anyone know how to change this value, please?
  8. X

    Reference Subform name in Nav form Header

    Hi Is there anyway to show the name of the active subform in the nav form header? I've tried something along the lines of the below but this doesn't work: [Forms]![NavigationForm]![NavigationSubform].[Form]
  9. X

    Combo Box Values Dependent on Criteria

    This may be a bit ambitious but I'm hoping it's something that can be achieved. On a form I have two combo boxes. In the first the user can select a report. In the second they can select a Department to filter the report by. What I would like is for the list of departments in that combo box...
  10. X

    Save to PDF without opening

    Hi I have the below code to save a report to pdf. However, I don't want the report to open so could someone suggest what I need to change in the code, please: Private Sub CreateReportBtn_Click() On Error GoTo cmdPrintMapArea1_Click_Err DoCmd.OpenReport Me.RepNameBox, acViewReport, ...
  11. X

    Runtime Error 2501- Getting annoying now.

    I'm getting a 2501 Open Form action cancelled error when I click the login button on my login form. On selecting debug the highlighted code is: DoCmd.OpenForm "Navigation Form" The Navigation form has an On Open event which calls a tempvars macro: Private Sub Form_Open(Cancel As Integer) If...
  12. X

    Update Field in Multiple Specific Records

    Hi In my table I frequently need to add a date in a date field for multiple specific records. It will always be the same date (usually current day) for all the selected records. As there can be 200+ needing to be updated I don't want to have to visit each record manually. How would I go about...
  13. X

    Command Button in Nav Form Not Working

    Can a functioning command button be added to a navigation form? I'm asking because I've added an exit application button underneath the left hand vertical tabs to quit the application, rather than having one on each subform. However, when I "click" the button nothing happens, it doesn't appear...
  14. X

    Update a table value dependent on another value

    New users to my db are assigned a default password ("password") but I want them to change this at first login and update the record password field in the table. I'm assuming I would need to use a recordset? However I've never worked with recordsets so I'm unsure where to start so I'd be...
  15. X

    Befor Update Len() VBA Not Working

    Hi Can anyone tell me why I may be getting a runtime error when executing this code (the code in red is what's causing the error apparently): Private Sub Pwdtxt0_BeforeUpdate(Cancel As Integer) If Len(Pwdtxt0) < 8 Then MsgBox "Please check your password and try again. Passwords must be...
  16. X

    Lost All Tables Except One

    Hi I have a database that had seven tables which I split. However, I added another table then selected to split the database again to move the new table to the back end but all tables have gone missing from the there except for the new one. The original seven do still show in the nav pane of...
  17. X

    Runtime error 3075 in VBA

    Hi I wonder if someone could please point out why I'm getting this error when logging into my db: Runtime Error 3705: Syntax error (missing operator) in query expression '[UserName]=Bob Smith' When I select debug this is the code it highlights: If Me.TxtPassword.Value = DLookup("PWD"...
  18. X

    Hide Some Combo Values Per Criteria

    I'm not sure if this is going to be possible but can someone please give me some guidance. My db has user access and hides some controls dependent on user permissions. I have a combo box that lists reports available. However, some of these are for administrator only. What I want to do, is...
  19. X

    Export/Print Filtered Report

    I've tried to find a solution to this but can't find anything conclusive, so I need some help with my code please. I have a form that has three . One combo to select a report, another combo to select a department to filter by, and a button to create the filtered report. I have the below code...
  20. X

    DLookup in text box not working

    In a form I want a dlookup to return the text value in UserAccess field in my table tblEmployees where the value in the table field strEmpName matches the value entered in text box txtUsername on the same form. I've entered the below dlookup in the form textbox but it keeps returning a Name...
Top Bottom