Search results

  1. M

    Import multiple files to multiple tables

    I suggest you to use "For each" syntaxt in place of the simple For ... With the InstrRev and Mid functions, you can extract the names of the files and use there as names of the tables. So you have the beloww code : For Each varFile In fd.selecteditems FileName = Mid(varFile, InStrRev(varFile...
  2. M

    Import multiple files to multiple tables

    Hello, And with : DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, lngItems, fd.SelectedItems(lngItems), True
  3. M

    Edit Replace via Script Several Changes

    Hello, Create a table of Change T_Change_City with fields : CityWrong and CityChange where you put the wrongs and the corrections. And you create an UpDate Query with the follow code : UPDATE Contacts INNER JOIN T_Change_City ON Contacts.City = T_Change_City.CityWrong SET Contacts.City =...
  4. M

    Tax Calculation

    Hello, Like this ?
  5. M

    Query to subtract two fields from multiple records

    Hello, 1- A first query named Q_Start SELECT (SELECT Count(Item) FROM Table1 as T2 WHERE T2.Item=T1.Item and T2.Start<T1.Start) AS RankFinal, T1.Item, T1.start FROM Table1 AS T1 WHERE ((((SELECT Count(Item) FROM Table1 as T2 WHERE T2.Item=T1.Item and T2.Start<T1.Start))<>0)) ORDER BY T1.start...
  6. M

    Display Subform records on main form as text

    Hello, A function like this ? : Public Function Concat_Child(IdParent As Integer) As String Dim rst As DAO.Recordset Dim ourtxt As String Set rst = CurrentDb.OpenRecordset("T_Child", dbOpenDynaset) ourtxt = "" With rst .FindFirst "[IdInit_FK]=" & IdParent While Not .NoMatch ourtxt =...
  7. M

    Gathered data within dash or 2 dotfrom the table field

    Hello, You use the Instr function and combine the result with MID. There below a code with the details where you can delete fields that you want with field SIGLE as result : SELECT YourTable.YourField, InStr([YourField],":") AS StartPos, Mid([YourField],[StartPos]+1,4) AS SIGLE FROM YourTable...
  8. M

    Dynamically search multiple fields (problem)

    Hello, I will give you some responses without the case of the picture 1- When you put your FRM_SearchMulti in the navigation pane, it becomes a subform. So the syntax [forms][FRM_SearchMulti]![SrchText] of criteria in the query QRY_SearchAll is bad. If you use the control, you must write...
  9. M

    Conditional Formatting on a lookup field list

    Hello, May be only with : [Issued?] = False
  10. M

    Opening a subform by selection in a combo box?

    Hello, Why don't you use tabs control with each sub form that you want. Another way is to manage the visibility property of your sub-forms at AfterUpDate evenement of the combobox, a code like : Sub Combo_AfterUpdate() Select Case Combo Case 1 Me.SFHistory.Form.Visible = True...
  11. M

    Total line from a Query displayed in a form

    You have a "Total" for each column of your query you said. I talk about these "fields" in the query.
  12. M

    Total line from a Query displayed in a form

    Hello, Use the DLookUp function as the source of the TextBox =DlookUp("[ControlOfTheQuery]","[TheQuery]") Good continuation
  13. M

    dlookup syntax

    Hello, May be like there ? ' If Me.Patient_StudyNum is numeric axe = DLookup("[Patient_Weight]", "Frailty_Assessment", "[Patient_StudyNum]=" & Me.Patient_StudyNum _ & " AND [Assessment_Type]='Inital' ") ' If Me.Patient_StudyNum is text axe = DLookup("[Patient_Weight]"...
  14. M

    Using doCmd.RunSQL

    Hello, And like this ? Private Sub Membership_Number_AfterUpdate() Dim SQL As String SQL = "INSERT INTO TBL_MemberLeagues ( League_ID, Member_ID, Registered )" & Chr(10) & _ "SELECT TBL_League.League_ID, TBL_Members.Membership_Number, False AS Expr1" & Chr(10) & _ "FROM TBL_League...
  15. M

    DSum and Filters

    DSum("[Duration]","[tblProjectTracking]","[TaskOrder]<=" & [TaskOrder] & " And [fkProjectsID]=" & [fkProjectsID]) - The first [TaskOrder] refers to the field of the table [tblProjectTracking]. - The second is the current value of the record. In an EXPRESSION, you must write it between "&". So...
  16. M

    DSum and Filters

    Hello, Like this ? SELECT MyTable.fkProjectsID, MyTable.TaskOrder, MyTable.Duration, DSum("[Duration]","[tblProjectTracking]","[TaskOrder]<=" & [TaskOrder] & " And [fkProjectsID]=" & [fkProjectsID]) AS Cumul FROM MyTable ORDER BY MyTable.fkProjectsID, MyTable.TaskOrder;
  17. M

    Textbox changes dependant on value

    Hello, The contitionnal Formating Menu allows you to do this without problems.
  18. M

    Insert data into another form

    Insert at NotInList event of your combobox as I said
  19. M

    Insert data into another form

    Hello, I presume you use the NotInList event of your combox ? You can use the NewData argument to assign the name of the new customer after opening the form as below : Private Sub CboCustomer_NotInList(NewData As String, Response As Integer) stDocName = "F_Customer" Response = acDataErrContinue...
  20. M

    Select last input from several date columns

    Hello, The difficulty is to fix the number of milestones wich has an effect on the number of your fields. Here a simple user function that give the result with 5 milestones. For you to adapt if there is more milestones Function StatusProject(ParDateStart As Variant, _...
Back
Top Bottom