Poobear1929
Technical User
I need some help, I would like to either write a SQL statment in module or run two queries I built. I think the SQL statment is the way to go though, but don't have much expeirence with it. Here is my problem, I want to add a record to a table if a certain condition doesn't exist. For example
Form = HMAL Meaning
Field 1 = MCN_Key
Field 2 = HMAL
Table = Raptor
Primary key = MCN
The other field I want updated = HMAL
If Form!HMAL Meaning!MCN_key = Raptor!MCN then don't create a new record, next update the Raptor!HMAL to equal FORM!HMAL Meaning!HMAL where Form!HMAL Meaning!MCN_key = Raptor!MCN
If there isn't a record in the Raptor table where Raptor!MCN equals the Form!HMAL!MCN_key, then create one and update the Raptor!HMAL to equal the HMAL Meaning!HMAL.
I hope this makes sense. It would sure help me out a lot if some one how I could write this.
Thanks
Poobear
Form = HMAL Meaning
Field 1 = MCN_Key
Field 2 = HMAL
Table = Raptor
Primary key = MCN
The other field I want updated = HMAL
If Form!HMAL Meaning!MCN_key = Raptor!MCN then don't create a new record, next update the Raptor!HMAL to equal FORM!HMAL Meaning!HMAL where Form!HMAL Meaning!MCN_key = Raptor!MCN
If there isn't a record in the Raptor table where Raptor!MCN equals the Form!HMAL!MCN_key, then create one and update the Raptor!HMAL to equal the HMAL Meaning!HMAL.
I hope this makes sense. It would sure help me out a lot if some one how I could write this.
Thanks
Poobear