sql - Type Mismatch error in Initialization form code calling an Access data table -


i encountering issue in project seems have occurred without code alteration. background, project got corrupted consequently redid entire project in workbook work around corruption. i'm concerned i'm facing same problem again not.

my program throwing following error when prompted pull first forms require connection access data table: "run-time error -2147352571 (80020005): type mismatch". instead of highlighting specific line of code in initialization portion of form, vb highlighted line of code form called out. i'm confident issue in section based on previous issues i've had form code. below code believe i'm having issue:

private sub userform_initialize()     call setconnection     'modify [week] data type     connection.execute "alter table raw_data alter column [week] date;"     'define recordset     set recordset = new adodb.recordset     recordset         .open "select distinct [week] raw_data;", connection, adopenstatic, adlockoptimistic         .movefirst     end     select_week_ending_form.week_ending_listbox         .clear                     .additem recordset![week]             recordset.movenext         loop until recordset.eof     end     set recordset = nothing     set cn = nothing end sub 

i'm new sql code apologize in advance if it's simple error respect that; again code working fine previously. if need additional code, please let me know. help.

jordan

eliminating looping in initialization code seems have fixed problem. implement throughout program. much!!!


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -