Search results

  1. T

    Can I replace Duplicate Key Error message ?

    I have recently changed the structure of my table to not allow duplicates, using a combined primary key. So in one respect i am happy now to stop the duplication, but how can i change the error message so it is more user friendly. Access front End - with Error Logging - but it does not log this...
  2. T

    ConcatRelated in a query.

    I am using The Allen Browne ConCatRelated VBA code and this has worked well for me for a number of years. I now want to take the Concat Field and store this data in a new field. - And i am struggling to do so. Current Code - tbInvoice = Nz(ConcatRelated("Invoice_Number"...
  3. T

    The data has changed "Bit Feild" / Cant assign a value to this object

    Morning all, on my recent form, I am getting 2 errors when running the code. vba below - Access front end - SQL Server back end. Me.chkApproved = true is a tick box in Access, Bit field in SQL Server, Default value is set as "0" but shows in SQL Server as ((0)). I get the error saying that...
  4. T

    Struggling with Error 3022 in SQL Server Table

    Run time error 3022 - when the me.dirty = false code is trying to run. Table in background is set to allow Nulls apart from the Primary Key Job_Id is the identity specification, set to increment by 1. The BIT Field is set to Default 0. The code runs after TbReference has been updated...
  5. T

    Update query in Access Updating SQl Server back end.

    Graduarly moving my tables into SQL Server. Each day at 19:00 i run a update query that copies 4 fields from a read only database, to a archive table (So i never loose the data) the read only database has approx 400,000 records, so daily i run a update query to store the data for any jobs that...
  6. T

    Help with adding new record - Access FE, SQL Server BE

    Sorry for another post but recently started moving my back end over to SQL. When the DB went live this morning, the users let me know they could not add any records to the DB. I have Primary Key Set, identity specification set as yes, With increment value also set, I have relinked the Table -...
  7. T

    Convert Code from Access

    I have the code below in a access query to update the JOb_ID fields that are blank, This is approx 600,000 rows, and takes forever to run - i have to keep stopping the query. What do i need to do to convert this, so i can run in SQL Server and not through access ? Thanks in advance. UPDATE...
  8. T

    dbSeeChanges Code

    I recently moved some of my tables into a SQL server, with a access front end, With this code the LogErrors (Allen Browne) is giving me a error code. Initially it was error 3622 -"You must use the dbSeeChanges option with OpenRecords", so i added SDSeeChanges, and now getting error 3001 at the...
  9. T

    OpenArgs

    Trying to use Openargs to filter a form using a value from a Combobox on a different form - but i just dont get how it works. This is what i have so far. Main Form Private Sub BtnFobDespatches_Click() On Error GoTo Handler Dim Stlinkcriteria As String WarningsOff Stlinkcriteria =...
  10. T

    Advice required Data looks like it is not saving until form is refreshed / Closed

    Need Advise please. Had this issue for some time now, trying to show the issue in the images below, when a user inputs some check data - they open up a form, and this assigns a job number - in the below the job number is 89889. the data is saved in a intake Table (tblIntake) and the detail is...
  11. T

    Only show queries that contain results, and close queries with no results

    My code below - looks for the prefix "Crash" and runs any query that contains "Crash" in the name. This then runs 13 queries - so i am just looking for a way to close the queries down that are blank, and just leave the ones that i need to look into further. Any thoughts. Function Test_it()...
  12. T

    Passing data between forms OpenArgs?

    Hi all, i need some help, Firstly - i tried to zip a copy of my database so i can upload, but the smallest i can get this is 12mb, so unfortunately i am unable to upload. I have 2 forms - FrmMain and Frminspection. My main form (FrmMain) assigns a job number to the request, and then when...
  13. T

    Audit Trail - Tabbed Control

    I have set up a new form with a Tab Control, that contains 5 tabs. On most of my forms in my database use the below code to track changes to fields that are Tagged ? If I Tag the Tab Control, I get error 2427 - You entered a expression that has no value. or error 438 - Object does not support...
  14. T

    How to call function name and pass into other function

    I am playing with some new code below to log the time that it takes to run a query. So i have added a new function called Startlog and EndLog. I want these to use the function name as i log this in my table, is there a easy way to pass the Function name to StartLog and EndLog so i dont have...
  15. T

    Import tables function

    I have the code below to import tables from my Master database to my Dummy database. The problem i have is the the Master database table is a link to a SQL table, and i want it to convert to a local table (Taking too long to pull data from SQL Server), and not just copy the link. Is there are...
  16. T

    Dlookup Multiple Criteria

    Still Struggling with another Dlookup for multiple criteria. My current code which works is WhoCharge = Nz(DLookup("Processor", "TblQCPreRetailSuppliers", "Supp_Code='" & Nz(tbSup_Code.Value, "") & "'"), "") and i want to add another criteria to check if the supplier is live, so tried this...
  17. T

    Inconsistent file errors

    Hi all, i have been having a few inconsistent file issues on my Front End recently. I have checked all my tables, and they do not seem to be corrupt, All forms and queries work, but i am seeing this error on a daily basis. Do i need to create a new Front End - Copy all current Forms / Queries...
  18. T

    Linking Forms

    Hi guys, i need some help, I have a main form (FrmMain) with a button to open another Form (FrmInspection) form main has a autonumber field (TBJobID) which i want to transfer over to the Frminspection form. so that when i open the inspection form it only shows the records for that job number...
  19. T

    Count fields that are conditionally Formatted

    I have 15 fields that are conditionally formatted based on there value, and i need to count eh number of fields that are Red and the number that are Green. Whats the easiest way to do this ?
  20. T

    Format Empty field on form

    I have the below code which works - but i wanted to condense it. due to the number of controls that i need to check. If IsNull(CboxSite) Then CboxSite.BackColor = vbRed CboxSite.SetFocus MsgBox ("Please complete the missing Fields.") Exit Sub Else CboxSite.BackColor = vbWhite End If So i have...
Top Bottom