Search results

  1. B

    Word count of memo in query?

    Hi everyone I have a database which receives nominations for an awards ceremony. I would like to filter these nominations using a query which shows only the nominations which meet a certain word length (>500). Currently, I have this as my query, but I realised this is actually filtering based...
  2. B

    Change combo box to original value?

    Hi everyone I maintain a large database of employees. I have a form with a combo box (cmb_department) which I can use to select a particular department. I have written an After Update event procedure which updates the relevant fields on the form after I've selected a department - e.g. their...
  3. B

    Data type mismatch in criteria expression

    I'm feeling really confused! I have a piece of VB code working perfectly when I "hardcode" a value into my script, but I get the run-time error '3464' data type mismatch in criteria expression when I run it with a variable. Here is my code: Private Sub cmb_department_AfterUpdate()...
  4. B

    Drowning in queries - is there an easier way?

    Just wanting to pick the collective brain of the forum and ask how I would be best off doing this... I maintain a large database of employees. Each employee has a record (stored in "user" table) and any changes relating to any of their employment details are audited by recording a record under...
  5. B

    Force unique, set length field value OR exceptions

    Is there any way to force a field value to be unique and of a set length, but with exceptions? Let me explain... I have a text field in my table called "employee_number" and this value is always one of the following: NULL an 8-digit number the word "External" What I want to do is to force...
  6. B

    Enter Parameter Value when it's already declared...?

    I'm trying to update a SQL table using a form button, and getting an "Enter Parameter Value" textbox prompt when the value is already declared. Not sure what is wrong. I know the value is valid as I'm returning it in a MsgBox. Here is my code. Private Sub cmd_data_merge_Click() finish =...
  7. B

    Using Mid in a string

    I'm trying to get a value from a spreadsheet to import into my MS Access database. Currently I am trimming the spaces/carriage returns from it but need to strip some more data from the value. Here is my code. trimmed_department = Trim(Replace(new_department, vbCrLf, "")) Example value...
  8. B

    Run-time error 3075

    I have a SQL search on the main page of my database which gives me run-time error 3075 "Syntax error" whenever my search_text value includes an apostrophe, e.g. "Susan O'Connor" Here's my code which is triggered when I hit search: sql_search = "SELECT * from dbo_users where job_title not...
  9. B

    Combining values in an expression using IIf

    Hello all I'm trying to create a text box on a form which displays a value based on numerous criteria. Basically I manage a database of employees. Some are external employees, some are internal. Some have left the organisation, and some are still employees. I have two fields which need to...
  10. B

    Write Conflict when using datasheet view with search

    I have a few forms - one search form (frm_main_search) which uses a basic datasheet view as a subform (subfrm_main_search), and one form which I launch from the subform (via a double click event) for the user record - frm_user_record. If I search for a user, then select them from the datasheet...
  11. B

    Trimming whitespace after pulling data from an Excel cell

    Hello people :) I've got a piece of VBA scripting which runs as an event linked to a button on my MS Access form. I maintain a database of members of staff at my organisation. It's pretty outdated... I'm basically wanting to pull in their updated data (extracted from on our payroll system)...
  12. B

    WHERE something exists and something else doesn't...

    I have a table called user_change an within that I record the changes that have been made to particular users. The fields I want to query are: username change_type This second one is a text field which has a value of the type of change. I want to find all of my users who've requested a...
  13. B

    Conditional query pulling data from two tables

    It's me again, being annoying... So I have two tables: users primary key = user_id (AutoNumber) surname (Text) forename (Text) ... user_change primary key = user_change_id (AutoNumber) user_id (Number) which relates to the user_id from "users" table change_type (Text) action_date...
  14. B

    Combining fields - spacing between values

    Hi :) I'm creating a query which pulls together the numerical values of 32 separate fields. Each field has the potential to have a value in it ranging between 1 and 9, but most fields will be blank. I want to prefix the value (if the value is not null) with a 2 or 3 character-long code...
  15. B

    Queries within queries?

    I have no idea if what I'm doing is even possible... However this is what I'd like to do. I have a database of around 15,000 users and I'd like to create a query that I can run on a weekly basis and save the results to an Excel spreadsheet. The results need to be logical and understandable...
  16. B

    Syntax error

    I was wondering if someone could help me please? I have a few tables, one of which stores a record of changes made to user accounts, and some of those changes are linked to a "multichange" table for when I have made the same change to multiple accounts. What I am trying to do is select the...
  17. B

    Check to ensure form is open before proceeding

    I'm struggling with a bit of code and can't seem to get the syntax right. I have an On Click procedure for one of my buttons but I don't want to allow it to run unless another form is currently open. My other form is frm_go_live and it contains some variables relating to a project launch. I...
  18. B

    If Then Else statements

    I need a bit of help with syntax as this one keeps throwing me off. I think it is likely to be a simple fix but I just can't figure it out. I have a field on frm_main2 called txt_leavers_list_multichange_id and within my VB code I want to make sure this field is populated before the script is...
  19. B

    Run-time error 3134 - syntax error?

    I am getting an intermittent error with my database running on SQL server with on-click actions written in VB. The error is... When I go to Debug it highlights the following area of code as a problem: actioned_by = Environ("username") SQL = "INSERT INTO dbo_ipms_user_change (ipms_user_id...
  20. B

    Property not found - only getting error since upgrading to 2010

    Our department users an MS Access database file created in an old version of access. The purpose is to maintain records of what access our IT users have to our systems. Since upgrading to Access 2010 I have been getting a "Property not found" error upon using the existing Save button on...
Back
Top Bottom