Search results

  1. B

    diary filter not returning correctly filtered records

    Hi, I have created a piece of code that filters a sub form of diary records using criteria the user has selected or entered. It was working fine when I made it a month or so ago and now is seems to be returning incorrectly filtered records, for example, I enter 2 dates to return all diary...
  2. B

    Code to check the contents of a field in a table where another field = something

    HI I am trying create some code that checks if the contents of the status field in a table is "Authorised" where the ID = something specific for multiple records. If all records witht the specific ID are "Authorised" Then generate a new record in another table. I know it's poorly explained but...
  3. B

    object invalid or no longer set; code works fine when I run it through an sql query

    Cheers guys, realised that the execution was in an if statement and I also accidentally closed the recordset and the database before I'd even finished with them!
  4. B

    object invalid or no longer set; code works fine when I run it through an sql query

    I am trying to run this update query through vba and when it goes to run it gives me the error "Object invalid or no longer set" yet when I copy the code and push it through the sql query window it works fine? Any Ideas? Here's the update query; dbs.Execute ("UPDATE tbl_CapexStaff SET...
  5. B

    insert statment not saving data to tables

    Access knows about the primary key. Do I put that code into the immediate window to see the results or? Thankyou for your help but I am really struggling with this, I have a deadline to have this working by the end of this week and it's giving me a nightmare. Cheers
  6. B

    insert statment not saving data to tables

    Ok I tried using the code you gave me and the error count was three andI got a run time error '3146' ODBC--Call failed The table I am trying to save the data to has a primary key which is added to the new record automatically as it is an autonumber Thanks for your help
  7. B

    insert statment not saving data to tables

    Ah yes the table I am inserting into is a linked table, what do I need to change for it to work? Many thanks
  8. B

    insert statment not saving data to tables

    Sorry, I don't quite understand what you're getting at? Digress? I have used sqlstr before and had no problems Many thanks
  9. B

    insert statment not saving data to tables

    I am trying to create a form in which users can save new supplier data to a database. I am using two insert statements which insert similar data in to two similar tables. The insert statements appear to have no problems and no errors are produced upon execution yet the new data doesn't save into...
  10. B

    Requery a subform from another form

    Thank you for your help but it still isn't working
  11. B

    Requery a subform from another form

    I have a subform in a tab within a mainform. Within the tab there is a button to open a form to delete/add data to the subform. So upon closing this pop up form I want to update the subform to show what has been deleted or added, I have tried the various things to requery the subform but none of...
  12. B

    Delete records from a table using controls on a subform

    This worked great Thanks a lot
  13. B

    Delete records from a table using controls on a subform

    I have a sub form that allows users to add staff to a project team, once added it populates a table which updates the subform showing the selected employee. I am trying to enable a delete function that allows users to remove an employee from the project team in the subform showing selected...
  14. B

    Unknown problem with insert statement

    I have a sub form with staff records on it within a main form. I am trying to allow the user to select a record from the sub form and add it to a table, here is my code which, to me, looks correct. However it gives me an error saying "Syntax error in INSERT INTO" Private Sub Command3_Click()...
  15. B

    Filter data in a subform

    I ran the sqlstr and sqlstrwhat through the immediate window and passed it through SQL and got an error "Syntax error in union query" However I am unsure what that means, thanks for ya help
  16. B

    Filter data in a subform

    Cheers, but it is still doing the same thing :/
  17. B

    Filter data in a subform

    I have a subform in a form that displays all members of staffs Name and employee no. I am trying to find a way to search the subform on the main form it's on using textboxes to filter data, here is the code I have that searches the employee no. Private Sub Command178_Click() Dim dbs As...
  18. B

    Filter diary data using two dates in vba

    Cheers, this has certainly helped a lot But if I use long date formatting (which is what the field in the table and sub form are set to) only one of the two dates in the header show a date and the the other comes up with "#######" when the other is in focus Here's the code you gave me but with...
  19. B

    Filter diary data using two dates in vba

    There is a subform linked to a table where diary entries are saved and the subform retrieves them, in the header of the form there are various combo boxes where the user selects the criteria and then clicks filter and it filters the data. Here's the code for the filter button for one of the...
  20. B

    Filter diary data using two dates in vba

    Add what sorry? Cheers
Top Bottom