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...
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...
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.
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"...
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...
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.
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"...
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
[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...
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.