Recent content by Workaholic_711

  1. W

    VBA Insert Sql Statement

    Thank you! Thank you! It worked!!!!!!
  2. W

    VBA Insert Sql Statement

    Thank you the feedback and explicitly mentioning that the code is a disaster. If it worked as expected, then I wouldn't have posted the question here :) Can you guide me and if possible post a solution to this? Are you implicating that taking out the ABS(checkbox#) is the solution and the code...
  3. W

    VBA Insert Sql Statement

    Thank you for looking into it. I figured out the problem, the code errors out when any one of the checkboxes is left unchecked. I tested the button with all check boxes checked, and it works fine but when I leave a box unchecked, that's where it errors out.
  4. W

    VBA Insert Sql Statement

    Hello, I have the below code but it keeps erroring out - Run time error 3464 Private Sub Command97_Click() Dim strSQL As String strSQL = "INSERT INTO [TblName]([Field1],[ Field2],[ Field3],[ Field4],[ Field5]," _ & "[ Field6],[ Field7],[ Field8],[Field9]," _...
  5. W

    ConcatRelated

    i have it like this but it's erroing out: INSERT INTO [Final Report] ( [Key], FinalString ) SELECT [Raw Data].Key, ConcatRelated("[Value]","[Raw Data]","[Key] = '" & [Key] & "'",[Forms]![frmStringDB].[lstDelimit]) AS FinalString FROM [Raw Data] GROUP BY [Raw Data].Key;
  6. W

    ConcatRelated

    Thanks, I 'll change it to an append query. so this is what i did: Public Function ConcatRelated(strField As String, _ strTable As String, _ Optional strWhere As String, _ Optional strOrderBy As String, _ Optional strMyListbx As String, _ Optional strMyListbox =...
  7. W

    ConcatRelated

    I ran into a new issue with this: My team wants a list box with multiple delimiter options. I created a list box and tried to plug the listbox.ItemsSelected in the strSeperator field, but it's not working.
  8. W

    ConcatRelated

    Here you go: SELECT [Raw Data].Key, Trim(ConcatRelated("[Value]","[Raw Data]","[Key] = '" & [Key] & "'")) AS FinalString INTO [Final Report] FROM [Raw Data] GROUP BY [Raw Data].Key;
  9. W

    ConcatRelated

    Is there a way i can set the field to hold more than 255 characters. The output is truncated where the string is more than 255 characters. I tried setting the final output field as Long text but that didnt seem to make any dent. Thanks again for your help!
  10. W

    ConcatRelated

    IT WORKED!!!!! :) THANK YOU SO MUCH!!! CLAIM_ID was a text field.
  11. W

    ConcatRelated

    It's not working correctly. i got the following output: CLAIM_ID Expr1001 ABC CPT1[CLAIM_ID] = "ABCCPT2[CLAIM_ID] = "ABCCPT3[CLAIM_ID] = "ABCCPT4[CLAIM_ID] = "ABCCPT5[CLAIM_ID] = "ABCCPT6 XYZ...
  12. W

    ConcatRelated

    I forgot to add the quotes. It's running but taking a long time...Will let you know the outcome as soon as it finishes running. Thank you!
  13. W

    ConcatRelated

    I tried the folowing select statement: SELECT DISTINCT [CLAIM_ID], ConcatRelated([PROCEDURE_CODES],[003_Claim_CPT_Codes],"[CLAIM_ID] = """ & [CLAIM_ID]) FROM 003_Claim_CPT_Codes group by [CLAIM_ID]
  14. W

    ConcatRelated

    Hello experts, I am learning VBA coding and came across the following issue: I have an access database which has a table named CPT_CODES_String. It has the following fields: CLAIM_ID, SERVICE_DATE, CPT_CODES, KEY(CLAIM_ID+SERVICE_DATE) One Claim can have mutiple cpt codes. I want to...
  15. W

    Hello

    Hello to All. I use access on a daily basis but now i am trying my hands on VBA. I have learned a lot from this community and am looking forward to enhance my knowledgebase and explore the endless oppurtunities that VBA entails with guidance of the expert community members.
Back
Top Bottom