Search results

  1. T

    CSV Import Issue

    Good Afternoon All; I have the following code in a module in my database: Function DoImport() Dim strPathFile As String Dim strFile As String Dim strPath As String Dim strTable As String Dim blnHasFieldNames As Boolean ' Change this next line to True if the first row in CSV worksheet ' has...
  2. T

    Solved Multiple condition in access query builder

    Afternoon all; Is it possible to use the query builder to set the criteria of a field in an access query? An example of what i want to do is as follows: Field Name: Selected: (IIf([Rtrd_EdrDate]=[Tret_DateFrom],"First Return") Or IIf([Rtrd_Status]="21","Possible Final Return") Or...
  3. T

    Query Formatting Based On Date

    Good Morning All; I am need help in formatting a MS Access 2016 query based on time of day, so for example: if hour ([CreatedDate]) is in [8 to 17.30] then "Daytime" else "Nighttime" How can i write this in the criteria of my query? Kind Regards Tor Fey
  4. T

    Query to get field name with datatype and size

    Does anyone have a SQL query to retrieve field names with datatype and size from all tables within an access database? I was hoping to use something like the below code... But, I want the SQL code to know the current database and tables without me having to specify them SELECT column_name as...
  5. T

    Modify VBA code to send email with attachment

    Good Afternoon all; I need a little help with the below code: linkString = "mailto:" & Email & "?subject=Application for " & Me.leavedays & " days " & Me.leavetype & " leave " & varme & "&body=Please approve my application for " & leavedays & " days " & leavetype & " leave for the period " &...
  6. T

    Solved Formatted Concatenated Textbox

    Morning All; I have a textbox with the following: I note that we have not received payment for: ref: " & [m_ref] & "/" & [m_folio] & " sent to you on the " &[datecreated] the above displays the end date as 10/09/2020 instead of 10th September 2020, how can i add the required formatting to the...
  7. T

    Multiple if statment

    Good Afternoon; I need to check that two fields on a form contain data before closing as they are linked to a report and can't have data in one field and not the other, I have tried the following: Dim varwhite, varyellow varwhite = RGB(255, 255, 255) varyellow = RGB(255, 255, 0) If...
  8. T

    Append Query for Records That Already Exist

    Good Afternoon all; I have two test tables I’m trying to perform an experiment on, test1 & test2. In both these tables; I have a field called ‘yearis’ which is a text field. What I’d like to do is create an append query that will: Update records in table 2 if it exists or append a record from...
  9. T

    Delete certain data from a table

    Good Morning; I have a table which holds personal data (tbl_staffnames), unfortunately it holds details on staff that have left our employment. In this table is a yes/no field called active, what I’d like to do is delete all the data in the following fields: officer_name full_name email_addy...
  10. T

    Filter Listbox

    Good Afternoon; I am trying to filter multiple listboxes from one core listbox with an onclick event. On the core (main) listbox I have the following onclick event: Me.writeoffdetails.Column(0) = Me.vatdetails.Column(0) Me.companiesdetails.Column(0) = Me.vatdetails.Column(0)...
  11. T

    Export to excel

    Morning All; I have the following export to excel code on a button in my form; which is working well: 'Check for and deletes the current All_Live_For_Sifting_Cred.xlsx file located: E:\All_Temporary_Data Dim stAppName As String stAppName =...
  12. T

    Display Fields with only money values

    Afternoon All; I have a query as per screen show below; is there a way to make it display where the 'qtr's' value is '1' show the value of 'SumOfTF_Ben_O/P' otherwise display value as: £0.00? So as it is now; in the query the values are displayed as: financialyear SumOfTF_Ben_O/P...
  13. T

    Add zero as a value with an append query

    Morning All; Is it possible to add the value 0 to a table with an append query within the criteria? I have an append query as seen in the attachment below, and what i need to do is, if one of the fields in the query has no value or is null then make that value 0. this does not need to happen...
  14. T

    After Update Event (Combo Box)

    Morning All; I have an after update event on a combo box as follows: Private Sub checktype_AfterUpdate() Dim intCheckName As Integer intCheckName = 1 If Nz(Me.check_name1, 0) = 0 Then 'apply selected name to check_Name1 intCheckName = 1 ElseIf Nz(Me.check_name2, 0) = 0 Then 'apply...
  15. T

    Fiscal Year

    Good Morning All; I have some criteria in my query which shows a calendar year as follows: Quarter1: IIf(DatePart("q",[tbl_tf_ben_interview]![TF_Ben_Date_Interview_under_Caution])=1 And Year([tbl_tf_ben_interview]![TF_Ben_Date_Interview_under_Caution])=2017,1,Null) But what I need to do is...
  16. T

    Field Validation

    Good Morning; I’m looking for help with text validation, what I need to do is ensure a field meets certain criteria before the user can continue. The Filed needs to start with two letters and end in one of three letters, so for example: MA12345678A The end letter will only ever be the fixed...
  17. T

    Query for different date criteria

    Good Afternoon All; Is it possible to run a query on a date field with different criteria in one query? I have a date filed in my main table which needs to work on the following date criteria in a report: 01/04/2017 to 30/06/2017 - Quarter 1 01/07/2017 to 30/09/2017 - Quarter 2 01/10/2017...
  18. T

    VBA Error: 'Compile Error: Block If Without End If'

    Good Afternoon all; I am getting an a Compile Error: 'Block If Without End If' in the below code :banghead:: Private Sub Processbutton_Click() If Me.RiskGrand = 0 Then MsgBox "The Case has not been risk tested yet", vbExclamation, "RISK ASSESSMENT REQUIRED" Exit Sub End If If Me.RiskGrand <=...
  19. T

    Create Update Query to update values from form to a table

    Good Morning All; I have a form called: frm_tf_ben_change_risk bound to a table called: tbl_TF_Ben_RiskScore. On the form I have created a button which I want to use to update a field from my form field: TF_Ben_Risk_Points to a field in another table called: TBL_TF_Ben_Main, to a field called...
  20. T

    MsgBox on close if field value equals Unallocated

    Good Morning All; Is it possible to have a YES/NO msgbox display if a field on a form is equal to a certain value? On my form; I have a close button with the following code that works fine: DoCmd.Close acForm, "frm_TF_Ben_Main" Forms!frm_tf_menu!mycaseis.RequeryWhat I would like to...
Top Bottom