P
Pawe³ Wróbel
Hello!
My situation looks like this:
I have a table with columns: id_user, id_product, amount
I have a form, on which I can choose usera, product and input amount.
And the problem:
After I press the button, I would like Access to check if there is a record
with a combiantion of given id_user and id_product. If exists then it should
add inputed amount to existing one. If not, then it should add new record. I
have a query that checks if such combiantion exists (returns position id), I
have a query that changes the amount and have a query that adds a new
record. But I'm not able to connect it into one solution.
Maye someone knows how to check if given query returns any rows or not, and
if not then run specified query.
Please help, I've spent 2 day on it
Pawel
My situation looks like this:
I have a table with columns: id_user, id_product, amount
I have a form, on which I can choose usera, product and input amount.
And the problem:
After I press the button, I would like Access to check if there is a record
with a combiantion of given id_user and id_product. If exists then it should
add inputed amount to existing one. If not, then it should add new record. I
have a query that checks if such combiantion exists (returns position id), I
have a query that changes the amount and have a query that adds a new
record. But I'm not able to connect it into one solution.
Maye someone knows how to check if given query returns any rows or not, and
if not then run specified query.
Please help, I've spent 2 day on it
Pawel