A
arumage
If I have warnings turned on like in the code below, the insert runs fine,
although it interupts the user to push OK, but if I set warnings to false,
it's almost as if it just ignores the insert all together. It's doesn't make
alot of sense to me why it would make any difference. Does anyone know why
it would be doing this or a way around it? I really don't want to interrupt
the process to have the user click OK a bunch of times.
DoCmd.SetWarnings True
DoCmd.RunSQL ("INSERT INTO [Leaf Orders]([LeafColor], [LeafColorActual],
[shaft], [Width], [Draw], [Pass], [Location], [B-W], [DesignNum], [Sheet],
[MarketNum], [Program], [pull1], [pull2], [length1], [length2]) VALUES('" &
ColorMeBad & "', '" & ColorMeBad & "', '" & shaft & "', " & Width & ", " &
Draw4 & ", " & Pass1 & ", '" & Location & "', '" & BorW5 & "', '" & CardNo &
"', '" & CardNo2 & "', '" & CardNo3 & "', " & Program & ", " & pull1 & ", " &
pull2 & ", " & length1 & ", " & length2 & ")")
DoCmd.SetWarnings False
although it interupts the user to push OK, but if I set warnings to false,
it's almost as if it just ignores the insert all together. It's doesn't make
alot of sense to me why it would make any difference. Does anyone know why
it would be doing this or a way around it? I really don't want to interrupt
the process to have the user click OK a bunch of times.
DoCmd.SetWarnings True
DoCmd.RunSQL ("INSERT INTO [Leaf Orders]([LeafColor], [LeafColorActual],
[shaft], [Width], [Draw], [Pass], [Location], [B-W], [DesignNum], [Sheet],
[MarketNum], [Program], [pull1], [pull2], [length1], [length2]) VALUES('" &
ColorMeBad & "', '" & ColorMeBad & "', '" & shaft & "', " & Width & ", " &
Draw4 & ", " & Pass1 & ", '" & Location & "', '" & BorW5 & "', '" & CardNo &
"', '" & CardNo2 & "', '" & CardNo3 & "', " & Program & ", " & pull1 & ", " &
pull2 & ", " & length1 & ", " & length2 & ")")
DoCmd.SetWarnings False