Hi,
I have a sql code:
When the red select return any value, then varriable 'stan' is correct. But when the red select has no value to return then raises error. I don't want error. When select returns an error then I want to have a value of 0
I have a sql code:
Code:
stan = CurrentProject.Connection.Execute([COLOR=Red]"SELECT quantity FROM Magazine WHERE nr_ref= " & [Forms]![Main]![nr_ref_wyst] & ";"[/COLOR]).Collect(0)
Last edited: