Search results

  1. T

    concatenate rows from same column

    insert query is not , update will be the most logical..: update ( select iif(len([name])>len([nextr]),[name] & [nextr],"") as ttt, ID from (select name, dfirst("name","mytable","name<> '" & [name] & "' and ID>=" & [ID]) as nextr, ID from mytable ) as trz...
  2. T

    concatenate rows from same column

    no problem.. :o Have you tried?..
  3. T

    concatenate rows from same column

    Open a query in sql view and paste.. then run the query
  4. T

    Count distinct in different columns

    select [IPC Subclass], ( select count([Family ID]) from [Chalmers Patents (w2 & namecheck)] where [Family ID]=trz.[Family ID] ) as [Count ofFamily ID], ( select count([ID]) from [Chalmers Patents (w2 & namecheck)] where [IPC Subclass]=trz.[IPC Subclass] ) as...
  5. T

    concatenate rows from same column

    Hi.. This query, gets the value of the next record and combines..: select iif( len([name]) >len([nextr]) ,[name] & [nextr], "") from ( select name...
  6. T

    Create folders dynamically...

    Hi Raghu.. ;) 1. this, to form frmPayPeriodAndDates..: Private Sub Form_Open(Cancel As Integer) CurrentDb.Execute "update tblPayPeriodAndDates set HaveActioned=0" CurrentDb.Execute "update tblPayPeriodAndDates set HaveActioned = -1 " _ & " where table2ID in (select top 1...
  7. T

    Querying using like statement

    Hi.. year in order to filter, use it..: ...... and ((year([Backup Date]))=[Enter Year])); if the first field type the date, it is..: where (((month([Backup Date Text]))=[Enter Month]) and ((year([Backup Date]))=[Enter Year]));
  8. T

    Select Query criteria

    Hi.. Like operator can use..: Like "*" &[Please enter in name to search for?]& "*"
  9. T

    fulfilling empty rows based on condition

    Hi.. Chris solve the problem, but I'll give an alternative to the query..: update bilansstanja set class=dlast("class","bilansstanja","[Id]<=" & [Id] & " and len([class])>0 ")
  10. T

    user name on main form

    Hi.. ;) Private Sub Form_Open(Cancel As Integer) Text17 = Forms.frm_Logon.cboEmployee 'add this to the. Dim strFrm As String strFrm = "frm_Logon" ....... ................... ......................... End SubAlso; if you define a variable global can use it anywhere ..
  11. T

    Common set of values for multiple columns

    Hi.. ;) If you look carefully, before the first color of the staff, I created a sub-query matches with the color chart.. then matched with the color chart again this query.. The first color in the query, since there are not hard to get other colors. Also .. I like SQL :cool:
  12. T

    Continuous form filtered by combo boxes to show also Null fields

    You are wellcome :) Change the relevant parts of it..: Private Sub Combo703_AfterUpdate() If IsNull(Combo703) Then Combo703 = "" DoFilter End Sub Private Sub Combo704_AfterUpdate() If IsNull(Combo704) Then Combo704 = "" DoFilter End Sub
  13. T

    Continuous form filtered by combo boxes to show also Null fields

    I am sorry. I forgot it :o criteria, in the query's..
  14. T

    Continuous form filtered by combo boxes to show also Null fields

    I did filter in your query ..Would you please check
  15. T

    Continuous form filtered by combo boxes to show also Null fields

    hi again.. ;) Can you try adding a space Private Sub DoFilter() Dim fStr As String fStr = "true " If Trim(Nz(Combo703, "")) <> "" Then fStr = fStr + " and [Vendor]='" & Combo703 & "' " Else fStr = "[Vendor] is null" If Trim(Nz(Combo704, "")) <> "" Then fStr = fStr + " and [Received_By]='" &...
  16. T

    Continuous form filtered by combo boxes to show also Null fields

    Hi.. Try this for show empty fields..: Private Sub DoFilter() Dim fStr As String fStr = "true " If Trim(Nz(Combo703, "")) <> "" Then fStr = fStr + "and [Vendor]='" & Combo703 & "' " else fStr= "[Vendor] is null" end if Me.Filter = fStr Me.FilterOn = True End Sub
  17. T

    If statement parsing in a query

    Hello.. ;) Are you try?.. Dim rs As New ADODB.Recordset rs.Open "TempTable", CurrentProject.Connection, 1, 3 rs.MoveFirst Do While Not rs.EOF ' This block splits the advisor's name wholename = rs("agentname") 'if there is a comma in the name If...
  18. T

    Common set of values for multiple columns

    Hi.. ;) Try this query..: select Firstname, trz.Colour as fav1, tbl_colours.Colour as fav2 from tbl_colours inner join ( tbl_favourites inner join (...
  19. T

    If query has no results

    If I understand correctly, this could be an alternative to..: private sub form_current() textbox_name=iif(me.subform_name.form.recordsetclone.recordcount=0, _ 0,subform_name.form.txtbox_sum) end sub
  20. T

    Running Query in VB Code and Assigned to a button on a Form

    Attention to color parts.. ;) iQuerySelect = "SELECT HD_GL_ACCT_BALANCE.DATE,HD_GL_ACCT_BALANCE.GL_ACCO UNT_NO AS Account_Number, MAP_BALC_DESC.BAL_DESC AS Description, HD_GL_ACCT_BALANCE.GL_BALANCE" iQueryFrom = " FROM HD_GL_ACCT_BALANCE INNER JOIN MAP_BALC_DESC ON...
Back
Top Bottom