Full Version: running command button...
UtterAccess Forums > Microsoft® Access > Access Forms
mjschukas
i have trouble running this code each and every time i click on the command button they are under (it runs successfully a number of times and then it doesn't run):
qlstrVI = "insert into t_condition(key_project_name, month) select " & key_project_name & " as key_project_name, #" & mydate_projectVI & "# as month"
DoCmd.RunSQL sqlstrVI
?should i be clearing the varialbes...?
thanks...
Jack Cowley
Try:
lstrVI = "insert into t_condition(key_project_name, month) select " & key_project_name & " as key_project_name, #" & mydate_projectVI & "# as month"
CurrentDb.Execute qlstrVI, dbFailOnError
And be sure that your variables do have values before you run the code...
hth,
Jack
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.