cblock1025
Technical User
I have one more question for you guys, can't figure it out or do not know if it can be done. Althouhg you guys seem to amaze me all the time.
Ok my database is for a Shrimp farm company and it handles a los of numbers and calculations. So here it goes:
'piscina = pool = table
'peso_W_total = total_weight = field in my table
'número_de_dias = number of days = field in my table.
'Number of days always increments by 7. They gather data
' every tuesday.
Ok I have this from another post and it works great. It grabs last weeks total_weight and subtracts it from this weeks. Which then gives me an increment.
UPDATE piscina INNER JOIN piscina AS piscina_1 ON piscina.dias=piscina_1.dias+7 SET piscina.incremento_total = piscina.peso_W_total-piscina_1.peso_W_total
However, the company has 16 pools and the problem is that this update will always pick up 7 days before even if the pool is 15 and not 16. I was trying to put like a where statement and make the criteria something like this:
'número_de_piscina = pool number = field in my table
where piscina.número_de_piscina = [forms]![muestreo_semanal]![número_de_piscina];
So, I was just thinking that when the user inputed into the form the pool number, lets say 16 it will only do that operation with the pools labeled 16. However, because the user is inputing at the moment I think that the table is still empty and it doesn't work. Any ideas?
I have the same problem with this:
=DLookUp("[peso_W_total]","piscina","[dias] =" & Forms!muestreo_semanal!dias-7)
I want to put like a criteria AND pool number equals the one they have inputed. Same as above where it only picks up the value of the specific pool number.
Thanks, I promise this will be my last question, hope so!!
Ok my database is for a Shrimp farm company and it handles a los of numbers and calculations. So here it goes:
'piscina = pool = table
'peso_W_total = total_weight = field in my table
'número_de_dias = number of days = field in my table.
'Number of days always increments by 7. They gather data
' every tuesday.
Ok I have this from another post and it works great. It grabs last weeks total_weight and subtracts it from this weeks. Which then gives me an increment.
UPDATE piscina INNER JOIN piscina AS piscina_1 ON piscina.dias=piscina_1.dias+7 SET piscina.incremento_total = piscina.peso_W_total-piscina_1.peso_W_total
However, the company has 16 pools and the problem is that this update will always pick up 7 days before even if the pool is 15 and not 16. I was trying to put like a where statement and make the criteria something like this:
'número_de_piscina = pool number = field in my table
where piscina.número_de_piscina = [forms]![muestreo_semanal]![número_de_piscina];
So, I was just thinking that when the user inputed into the form the pool number, lets say 16 it will only do that operation with the pools labeled 16. However, because the user is inputing at the moment I think that the table is still empty and it doesn't work. Any ideas?
I have the same problem with this:
=DLookUp("[peso_W_total]","piscina","[dias] =" & Forms!muestreo_semanal!dias-7)
I want to put like a criteria AND pool number equals the one they have inputed. Same as above where it only picks up the value of the specific pool number.
Thanks, I promise this will be my last question, hope so!!