Gunnar Bozeman
New member
- Local time
- Today, 21:21
- Joined
- Jun 10, 2003
- Messages
- 9
Hello,
I have a need to update two fields in a table automatically from a radio button on a form. I need help.
When the button is clicked, I want to change the field “Status” from “Future CO” to “CO Issued” and have the field “CO Number” fill in the next chronological CO number based on the last CO number for a given Company (field “CompanyName”). See example of table below.
The results of running the command would be:
Marvin 006 status changed to “CO Issued” and “CO Number” automatically fills in “003”.
Fred 002 and Fred 005 status changed to “CO Issued” and “CO Number” automatically fills in “001” and “002” respectively.
John 003 status changed to “CO Issued” and “CO Number” automatically fills in “001”.
Note that the field “CO Number” is left blank until the status is changed. The CO Number field must know to fill in “001” if blank/null.
Do I run this from code in the form or some type of query? I realize I am asking a lot, but being able to do this will unlock many mysteries for me.
Thank You Much for any help.
Gunnar
I have a need to update two fields in a table automatically from a radio button on a form. I need help.
When the button is clicked, I want to change the field “Status” from “Future CO” to “CO Issued” and have the field “CO Number” fill in the next chronological CO number based on the last CO number for a given Company (field “CompanyName”). See example of table below.
Code:
SubsID CompanyName Status CO Number
001 Marvin CO Issued 001
002 Fred Future CO
003 John Future CO
003 Marvin CO Issued 002
005 Fred Future CO
006 Marvin Future CO
007 Tom CO Issued 001
The results of running the command would be:
Marvin 006 status changed to “CO Issued” and “CO Number” automatically fills in “003”.
Fred 002 and Fred 005 status changed to “CO Issued” and “CO Number” automatically fills in “001” and “002” respectively.
John 003 status changed to “CO Issued” and “CO Number” automatically fills in “001”.
Note that the field “CO Number” is left blank until the status is changed. The CO Number field must know to fill in “001” if blank/null.
Do I run this from code in the form or some type of query? I realize I am asking a lot, but being able to do this will unlock many mysteries for me.
Thank You Much for any help.
Gunnar
Last edited: