Posts by baberosa

    I tried to create table in Access VBA, however it seems i only can run the code successfully if the field to be created is 33. When I add one more field, is gives runtime error 3292 syntax error in field definition.



    this drives me nuts



    Code
    SQLStr2 = "CREATE TABLE Data" & _
    "(d0 TEXT, d1 TEXT, d2 TEXT, d3 TEXT, d4 TEXT, d5 TEXT, d6 TEXT, d7 TEXT, d8 TEXT, d9 TEXT, d10 TEXT, d11 TEXT, d12 TEXT, d13 TEXT, d14 TEXT, d15 TEXT, d16 TEXT, d17 TEXT, d18 TEXT," & _
    "d19 TEXT, d20 TEXT, d21 TEXT, d22 TEXT, d23 TEXT, d24 TEXT, d25 TEXT, d26 TEXT, d27 TEXT, d28 TEXT, d29 TEXT, d30 TEXT, d31 TEXT, d32 TEXT, d33 TXT)"



    anyone has got an idea?



    thanks

    Hi guys,



    i know this has been done to death. but i still cannot digest it. I have done hundreds of search in the last month, youtube, etc but maybe coz i am not bright enough, and i am a noob at VBA, i cannot make it working.



    Here is what i am trying to do: I want to populate comboboxes in main.xlsm from a range in another workbooks (name.xlsx and city.xlsx).


    main.xlsm has 2 comboboxes. combobox 1 will contain value/range from workbooks name.xlsx (b2:b6), and combobox 2 will contain value from workbook city.xlsx (a2:a5).




    I have tried some code, including the one i seen in this forum.



    e.g.


    ThisWorkBook





    but none is working.



    is anyone here kind enough to show me how to accomplish this? many thanks!