Search results

  1. T

    Advice when working with dates on form Between StartDate AND EndDate

    In my Data tables i now have added in a StartDate and EndDate - As per image below. My combo box on my charge page - now looks at the Start and End Date - to bring back the most upto date unit cost - This is fed by the CboxCost_Type_Desc. What i am seeing is that when the end date has passed...
  2. T

    VBA for looking up a record between Start and End Data.

    Thanks, this resolved the issue.
  3. T

    VBA for looking up a record between Start and End Data.

    Think i have sort of sorted it - when changing the code to look at todays date it works. So for some reason does not like the TbChargeDate field. Me.tbRate = Nz(DLookup("Unit_Cost", "TblQCPreRetailSuppliers", "Supp_Code='" & Forms!FrmPreRetailJobs!CboxSupplier & "' AND DATE() BETWEEN...
  4. T

    VBA for looking up a record between Start and End Data.

    This gives me a strange error - when i debug i get the below. ? Format(Forms!FrmPreRetailcharges.tbChargeDate, "#mm/dd/yyyy#") 4540mm/dd/yyyy7 Not sure if it matters but the back end is stored in SQL Sever, and data type is DateTime.
  5. T

    VBA for looking up a record between Start and End Data.

    Trying to get my head around this VBA - This code currently works - but i need to introduce a new charge in my table starting from 01-07-2024 - So i need to change this code to look for the StartDate and The EndDate. Initial Code Me.tbRate = Nz(DLookup("Unit_Cost", "TblQCPreRetailSuppliers"...
  6. 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...
  7. T

    Copy Linked Access Tables to Local Tables with VBA

    I know this thread is old, but I get the same error when running the code - but it works ok if i step through the code using F8.
  8. T

    ConcatRelated in a query.

    Sorry did not work. Also Tried ConcatRelated("Invoice_Number","Temp_Aged_claims","[Temp_Aged_Claims].[Job_ID] = " & [tblQCPlannedRTMCharges].[Job_ID] & "") And i get all the invoices combined for all jobs.
  9. 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"...
  10. T

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

    Thanks. What code should I remove from sub form that is unnecessary
  11. T

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

    Rem out this attempt save code did not resolve the issue.
  12. T

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

    Appreciate if someone can have a look at the enclosed and advise. Add new record, Select Supplier Code, add a Comment, Select charge reason on sub form, add a Qty, then approve and send to finance. Fails at ChkApproved = 1
  13. T

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

    DoCmd.RunCommand acCmdSaveRecord
  14. T

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

    [CODE]Private Sub btnProgress_Click() 'On Error GoTo Handler Dim TargetFile As String Dim MessageBody As String Dim tolist As String Dim cclist As String Dim AttArray() tbapproverlbl.Visible = True Me!SubfrmCSRChargeDetail.Enabled = False If MsgBox("You cannot reverse this process. Are...
  15. T

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

    Changed to Int Data type, relinked, Changed code to Me.chkApproved = 1, still getting data has been changed, and this line is highlighted. Noted that if i come out of the form, and then go back into it - the code runs with no issues.
  16. T

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

    NO Nulls, just True and False. Thanks for the advise on Integer Field - will look at this next.
  17. 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...
  18. T

    Struggling with Error 3022 in SQL Server Table

    Ok- working though the issue - created a new form - and it works without the me.dirty code - automatically assigning the job id - so it is definately a issue with the form, but not sure where to start. Might just be easier starting a new form from scratch.
  19. T

    Struggling with Error 3022 in SQL Server Table

    I have the record save at that point to assign the job number to the record. The job number is a link between form and sub form. 3 images below - Image 1 - from when it was connected to Access Back end - and it worked, Image 2 - is when i start a new record. Image 3 - from now i have...
  20. T

    Struggling with Error 3022 in SQL Server Table

    Yes - When editing table directly I only need to input 1 field and it saves. Error is on the Me.dirty = false Record is not saved
Top Bottom